mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-03-03 08:39:45 +01:00
la til mulighet til å mota programming cards
This commit is contained in:
parent
ce97c92325
commit
847586d06c
@ -4,8 +4,10 @@ import com.esotericsoftware.kryonet.Client;
|
|||||||
import com.esotericsoftware.kryonet.Connection;
|
import com.esotericsoftware.kryonet.Connection;
|
||||||
import com.esotericsoftware.kryonet.Listener;
|
import com.esotericsoftware.kryonet.Listener;
|
||||||
import inf112.fiasko.roborally.game_wrapper.RoboRallyWrapper;
|
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.ErrorResponse;
|
||||||
import inf112.fiasko.roborally.networking.containers.GameStartInfo;
|
import inf112.fiasko.roborally.networking.containers.GameStartInfo;
|
||||||
|
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
||||||
import inf112.fiasko.roborally.objects.RoboRallyGame;
|
import inf112.fiasko.roborally.objects.RoboRallyGame;
|
||||||
import inf112.fiasko.roborally.utility.NetworkUtil;
|
import inf112.fiasko.roborally.utility.NetworkUtil;
|
||||||
|
|
||||||
@ -16,7 +18,6 @@ import java.io.IOException;
|
|||||||
*/
|
*/
|
||||||
public class RoboRallyClient {
|
public class RoboRallyClient {
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new Robo Rally client
|
* Instantiates a new Robo Rally client
|
||||||
* @param ipAddress The ip address of the server to connect to
|
* @param ipAddress The ip address of the server to connect to
|
||||||
@ -64,7 +65,10 @@ class RoboRallyClientListener extends Listener {
|
|||||||
} else if (object instanceof GameStartInfo) {
|
} else if (object instanceof GameStartInfo) {
|
||||||
GameStartInfo info = (GameStartInfo) object;
|
GameStartInfo info = (GameStartInfo) object;
|
||||||
wrapper.roboRallyGame = new RoboRallyGame(info.getPlayerList(), info.getBoardName(),
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user