class PlayerOptions
Constants
- AI_VS_HUMAN
- HUMAN_VS_AI
- HUMAN_VS_HUMAN
- ID_TO_PLAYER_TYPE
Public Class Methods
all()
click to toggle source
# File lib/player_options.rb, line 27 def self.all ID_TO_PLAYER_TYPE end
display_player_options()
click to toggle source
# File lib/player_options.rb, line 20 def self.display_player_options player_options_for_display = ID_TO_PLAYER_TYPE.each_pair.map do |id, option| open_bracket + id.to_s + close_bracket + space + option end player_options_for_display.join(comma + space) end
player_type_for_id(id)
click to toggle source
# File lib/player_options.rb, line 16 def self.player_type_for_id(id) game_value_of_player = ID_TO_PLAYER_TYPE.fetch(id) end
valid_ids()
click to toggle source
# File lib/player_options.rb, line 12 def self.valid_ids ID_TO_PLAYER_TYPE.keys end
Private Class Methods
close_bracket()
click to toggle source
# File lib/player_options.rb, line 37 def self.close_bracket ")" end
comma()
click to toggle source
# File lib/player_options.rb, line 45 def self.comma "," end
open_bracket()
click to toggle source
# File lib/player_options.rb, line 33 def self.open_bracket "(" end
space()
click to toggle source
# File lib/player_options.rb, line 41 def self.space " " end