Class: PFM::Hall_of_Fame

Inherits:
Object show all
Defined in:
docs/4_Systems_300_Hall_of_fame.rb

Overview

Class describing the Hall_of_Fame logic

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(game_state = PFM.game_state) ⇒ Hall_of_Fame

Create a new hall of fame

Parameters:

  • game_state (PFM::GameState) (defaults to: PFM.game_state)

    variable responsive of containing the whole game state for easier access



12
13
# File 'docs/4_Systems_300_Hall_of_fame.rb', line 12

def initialize(game_state = PFM.game_state)
end

Instance Attribute Details

#game_statePFM::GameState

Get the game state responsive of the whole game state

Returns:



9
10
11
# File 'docs/4_Systems_300_Hall_of_fame.rb', line 9

def game_state
  @game_state
end

#player_victoryArray

Array containing every victory of the player

Returns:

  • (Array)


6
7
8
# File 'docs/4_Systems_300_Hall_of_fame.rb', line 6

def player_victory
  @player_victory
end

Instance Method Details

#register_victory(mode = :league)

Register a win in the Pokemon League for the player

Parameters:

  • mode (Symbol) (defaults to: :league)

    the symbol designing the type of victory : possible victory are :league and :title_defense



16
17
# File 'docs/4_Systems_300_Hall_of_fame.rb', line 16

def register_victory(mode = :league)
end