Sha256: de0cd87fee04557325dd37f6fbed470431c0699c9c4d17735c686363cd4d4fd0

Contents?: true

Size: 525 Bytes

Versions: 1

Compression:

Stored size: 525 Bytes

Contents

require 'tarzan/games/base/game'
require 'tarzan/games/rock_paper_scissors/move'

module Tarzan
  module Games
    module RockPaperScissors
      class Game < Base::Game

      private

        def rules
          'Rock beats Scissors beats Paper beats Rock'
        end

        def prompt_move
          choice = @interface.prompt Move.valid
          Move.new choice: choice
        end

        def random_move
          choice = Move.valid.sample
          Move.new choice: choice
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tarzan-0.0.3 lib/tarzan/games/rock_paper_scissors/game.rb