picking up project again. Fixing rspec errors first
This commit is contained in:
+1
-6
@@ -39,12 +39,7 @@ loop do
|
||||
begin
|
||||
encoded_command = JSON.parse(line.chomp)
|
||||
response = ''
|
||||
if encoded_command['type'] == 'hello'
|
||||
# Here we need to get the client information.
|
||||
response = game.player_connect(client, encoded_command).to_json
|
||||
else
|
||||
response = game.parse_command(encoded_command).to_json
|
||||
end
|
||||
response = game.parse_command(client, encoded_command)
|
||||
puts "Received: #{line.chomp}"
|
||||
puts "Sending: #{response}"
|
||||
client.puts "#{response}"
|
||||
|
||||
Reference in New Issue
Block a user