class Rockpaperscissors123::ComputerPlayer
Attributes
move[W]
moves[R]
Public Class Methods
new()
click to toggle source
# File lib/rockpaperscissors123/computer_player.rb, line 7 def initialize @moves = ["rock", "paper", "scissors"] end
Public Instance Methods
decide_move()
click to toggle source
# File lib/rockpaperscissors123/computer_player.rb, line 11 def decide_move self.move = moves.sample end