Class: RPSGame::Computer
- Inherits:
-
Object
- Object
- RPSGame::Computer
- Defined in:
- lib/rps_game/computer.rb
Instance Method Summary collapse
-
#random_move ⇒ Object
Generate a random number to indicate the random item.
Instance Method Details
#random_move ⇒ Object
Generate a random number to indicate the random item
4 5 6 |
# File 'lib/rps_game/computer.rb', line 4 def random_move 1 + rand(3) end |