Class: Settlers::Server

Inherits:
Object
  • Object
show all
Includes:
Observable
Defined in:
lib/settlers/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(port) ⇒ Server

Returns a new instance of Server.



8
9
10
# File 'lib/settlers/server.rb', line 8

def initialize(port)
  @address = Address.new(name, '127.0.0.1', port)
end

Instance Method Details

#startObject



12
13
14
15
16
# File 'lib/settlers/server.rb', line 12

def start
  Java.server.start(@address.port, 10, 'root', '')
  changed
  notify_observers :server_exists_at, @address
end