Class: GamesAndRpgParadise::Mechwars::WorldCredits

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/games_and_rpg_paradise/games/mechwars/world_credits.rb

Overview

GamesAndRpgParadise::Mechwars::WorldCredits

Instance Method Summary collapse

Constructor Details

#initializeWorldCredits

#

initialize

#


20
21
22
23
# File 'lib/games_and_rpg_paradise/games/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
35
# File 'lib/games_and_rpg_paradise/games/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