Class: SakuRps::CPUPlayer

Inherits:
Player
  • Object
show all
Defined in:
lib/saku_rps/player.rb

Constant Summary collapse

CPU_PLAY_OPTIONS =
%w(ROCK PAPER SCISSORS).freeze

Instance Attribute Summary

Attributes inherited from Player

#choice, #name

Instance Method Summary collapse

Methods inherited from Player

#initialize

Constructor Details

This class inherits a constructor from SakuRps::Player

Instance Method Details

#choose_playObject



48
49
50
51
# File 'lib/saku_rps/player.rb', line 48

def choose_play
  self.choice = CPU_PLAY_OPTIONS.sample
  nil
end