1
0
mirror of https://github.com/inf112-v20/Fiasko.git synced 2025-03-03 00:29:45 +01:00

la til mulighet til å mota programming cards

This commit is contained in:
Tobydrama 2020-04-14 14:49:11 +02:00
parent ce97c92325
commit 847586d06c

@ -4,8 +4,10 @@ import com.esotericsoftware.kryonet.Client;
import com.esotericsoftware.kryonet.Connection;
import com.esotericsoftware.kryonet.Listener;
import inf112.fiasko.roborally.game_wrapper.RoboRallyWrapper;
import inf112.fiasko.roborally.game_wrapper.screens.CardChoiceScreen;
import inf112.fiasko.roborally.networking.containers.ErrorResponse;
import inf112.fiasko.roborally.networking.containers.GameStartInfo;
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
import inf112.fiasko.roborally.objects.RoboRallyGame;
import inf112.fiasko.roborally.utility.NetworkUtil;
@ -16,7 +18,6 @@ import java.io.IOException;
*/
public class RoboRallyClient {
private final Client client;
/**
* Instantiates a new Robo Rally client
* @param ipAddress The ip address of the server to connect to
@ -64,7 +65,10 @@ class RoboRallyClientListener extends Listener {
} else if (object instanceof GameStartInfo) {
GameStartInfo info = (GameStartInfo) object;
wrapper.roboRallyGame = new RoboRallyGame(info.getPlayerList(), info.getBoardName(),
wrapper.server != null);
wrapper.server != null,info.getPlayerName());
}
else if(object instanceof ProgrammingCardDeck){
wrapper.setScreen(new CardChoiceScreen(wrapper,(ProgrammingCardDeck) object));
}
}
}