wasn't actually sending the event type when moving a game back to the lobby, clients didn't know what to do
This commit is contained in:
parent
d06e835ac4
commit
7a8da9bf72
|
@ -117,6 +117,8 @@ public class Game {
|
||||||
/**
|
/**
|
||||||
* Remove a player from the game.
|
* Remove a player from the game.
|
||||||
*
|
*
|
||||||
|
* TODO adjust judgeIndex if the player removed is at or before the index
|
||||||
|
*
|
||||||
* @param user
|
* @param user
|
||||||
* Player to remove from the game.
|
* Player to remove from the game.
|
||||||
* @return True if {@code user} was the last player in the game.
|
* @return True if {@code user} was the last player in the game.
|
||||||
|
@ -370,6 +372,7 @@ public class Game {
|
||||||
|
|
||||||
// TODO announce the reset
|
// TODO announce the reset
|
||||||
final HashMap<ReturnableData, Object> data = getEventMap();
|
final HashMap<ReturnableData, Object> data = getEventMap();
|
||||||
|
data.put(LongPollResponse.EVENT, LongPollEvent.GAME_STATE_CHANGE.toString());
|
||||||
data.put(LongPollResponse.GAME_STATE, GameState.LOBBY.toString());
|
data.put(LongPollResponse.GAME_STATE, GameState.LOBBY.toString());
|
||||||
broadcastToPlayers(MessageType.GAME_EVENT, data);
|
broadcastToPlayers(MessageType.GAME_EVENT, data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue