class Tarzan::Games::OddsAndEvens::Game
Private Instance Methods
prompt_move()
click to toggle source
# File lib/tarzan/games/odds_and_evens/game.rb, line 15 def prompt_move choice = @interface.prompt(Move.valid).to_i Move.new choice: choice, wins_on_odds: true end
random_move()
click to toggle source
# File lib/tarzan/games/odds_and_evens/game.rb, line 20 def random_move choice = Move.valid.sample Move.new choice: choice, wins_on_odds: false end
rules()
click to toggle source
# File lib/tarzan/games/odds_and_evens/game.rb, line 11 def rules 'Odd sum wins, even sum loses' end