Commit 4e6f5ca
Changed files (2)
bin
lib
mathy
bin/mathy
@@ -4,7 +4,6 @@ require 'mathy'
module Mathy
console = Console.new
- difficulty = Difficulties::GradeTwo.new
game = Game.new(Player.new(console.greet), console)
- game.play(console.how_many_turns?, difficulty)
+ game.play(console.how_many_turns?, console.difficulty?)
end
lib/mathy/console.rb
@@ -14,6 +14,10 @@ module Mathy
operations.find { |operation| operation.matches?(selection) }
end
+ def difficulty?
+ Difficulties::GradeTwo.new
+ end
+
def prompt?(question)
puts question
gets.strip