Class: GamesParadise::Mechwars::WorldCredits
- Inherits:
-
Object
- Object
- GamesParadise::Mechwars::WorldCredits
- Includes:
- Singleton
- Defined in:
- lib/games_paradise/mechwars/world_credits.rb
Instance Method Summary collapse
-
#create_player_slot(name_of_player, amount_of_money_he_has_available) ⇒ Object
# === create_player_slot.
-
#initialize ⇒ WorldCredits
constructor
# === initialize ========================================================================= #.
Constructor Details
#initialize ⇒ WorldCredits
#
initialize
#
20 21 22 23 |
# File 'lib/games_paradise/mechwars/world_credits.rb', line 20 def initialize @available_money = 1_000_000_000 # credits @hash_player_slot = {} end |
Instance Method Details
#create_player_slot(name_of_player, amount_of_money_he_has_available) ⇒ Object
#
create_player_slot
Create a new player slot.
#
30 31 32 33 34 |
# File 'lib/games_paradise/mechwars/world_credits.rb', line 30 def create_player_slot( name_of_player, amount_of_money_he_has_available ) @hash_player_slot[name_of_player] = amount_of_money_he_has_available end |