Class: GameRunner
- Inherits:
-
Object
- Object
- GameRunner
- Defined in:
- game/game_runner.rb
Overview
GameRunner abstracts any clutter in the main file and contains a singular static method. This method can be called without creating an instance of GameRunner.
Class Method Summary collapse
-
.run ⇒ NilClass
The static method, run, creates the instance of config and gets the ip and port for the server.
Class Method Details
.run ⇒ NilClass
The static method, run, creates the instance of config and gets the ip and port for the server. It then starts running the game loop.
21 22 23 24 25 26 27 28 29 |
# File 'game/game_runner.rb', line 21 def self.run config = Config.new ip, port = config.ip, config.port name = gets client = Game.new(ip, port, name) client.run nil end |