Pushing all changes
This commit is contained in:
@@ -221,7 +221,18 @@ class Universe
|
||||
return result
|
||||
end
|
||||
|
||||
# Runs a tick of the game. Passes it on to all of the sub objects
|
||||
def tick
|
||||
# Incriment planets
|
||||
@planet_list.each do |planet|
|
||||
planet.tick
|
||||
end
|
||||
|
||||
# Incriment ships
|
||||
@ship_list.each do |ship|
|
||||
ship.tick
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -272,6 +283,7 @@ class Universe
|
||||
def create_ship(player, position)
|
||||
return false unless validate_player(player)
|
||||
end
|
||||
alias_method :add_ship, :create_ship
|
||||
|
||||
# Move a player's ship to a given position
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user