class TicTacToeRZ::Players::PlayerType
Constants
- OPTIONS
Attributes
selected_option[R]
Public Class Methods
new(type)
click to toggle source
# File lib/tic_tac_toe_rz/tictactoeruby.core/players/player_type.rb, line 15 def initialize(type) raise Exceptions::InvalidValueError, "type = #{type}" if !PlayerType.valid?(type) @selected_option = type end
valid?(type)
click to toggle source
# File lib/tic_tac_toe_rz/tictactoeruby.core/players/player_type.rb, line 11 def self.valid?(type) OPTIONS.include?(type) end