Class: GamesAndRpgParadise::Godmode::GamePlay
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::Godmode::GamePlay
- Defined in:
- lib/games_and_rpg_paradise/games/godmode/gameplay.rb
Instance Attribute Summary collapse
-
#array_player_objects ⇒ Object
Returns the value of attribute array_player_objects.
Instance Method Summary collapse
-
#enter_bazaar ⇒ Object
# === enter_bazaar.
-
#get_player_data ⇒ Object
# === get_player_data ========================================================================= #.
-
#initialize ⇒ GamePlay
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset ========================================================================= #.
-
#which_player? ⇒ Boolean
# returns verbose way like first, second and so on.
Constructor Details
#initialize ⇒ GamePlay
#
initialize
#
25 26 27 |
# File 'lib/games_and_rpg_paradise/games/godmode/gameplay.rb', line 25 def initialize reset end |
Instance Attribute Details
#array_player_objects ⇒ Object
Returns the value of attribute array_player_objects.
20 21 22 |
# File 'lib/games_and_rpg_paradise/games/godmode/gameplay.rb', line 20 def array_player_objects @array_player_objects end |
Instance Method Details
#enter_bazaar ⇒ Object
#
enter_bazaar
here the players will enter the bazaar.
#
73 74 75 76 77 78 79 80 |
# File 'lib/games_and_rpg_paradise/games/godmode/gameplay.rb', line 73 def enter_bazaar cliner e 'Die Spieler betreten der Reihe nach den Bazaar:' cliner # Nun rufe für jeden den bazaar auf @object_bazaar = Bazaar.new(@array_player_objects[0]) @object_bazaar. end |
#get_player_data ⇒ Object
#
get_player_data
#
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/games_and_rpg_paradise/games/godmode/gameplay.rb', line 48 def get_player_data e e 'Herzlich Willkommen zu Godmode, meinem 2. Spiel (nach Kaisers)' e e sfancy('Wie viele Spieler sollen mitspielen?') @n_players = STDIN.gets.chomp.to_i @n_players = 1 if @n_players == 0 @n_players = 1 # HARDCODE. e 'HARDCODE, only one player can play right now' e "Ok, #{@n_players} Spieler werden mitspielen." # gets names and populate our array @n_players.times { tmp = Player.new tmp.get_name e "Name war: #{tmp.name?}" @array_player_objects << tmp } enter_bazaar end |
#reset ⇒ Object
#
reset
#
32 33 34 35 36 37 |
# File 'lib/games_and_rpg_paradise/games/godmode/gameplay.rb', line 32 def reset @object_time = TimeHandler.new @object_bazaar = '' @n_players = 0 @array_player_objects = [] # stores our players. end |
#which_player? ⇒ Boolean
#
returns verbose way like first, second and so on.
#
42 43 |
# File 'lib/games_and_rpg_paradise/games/godmode/gameplay.rb', line 42 def which_player? end |