Class: Computer

Inherits:
Player show all
Defined in:
lib/rps_telwell/player.rb

Overview

Create a new computer player.

Instance Attribute Summary

Attributes inherited from Player

#wins

Instance Method Summary collapse

Methods inherited from Player

#initialize, #valid_move?

Constructor Details

This class inherits a constructor from Player

Instance Method Details

#get_moveObject

Computer version of get_move



52
53
54
# File 'lib/rps_telwell/player.rb', line 52

def get_move
	rand(1..3)
end