Compare commits
1 commit
e0f23f31d8
...
eff9ea139a
Author | SHA1 | Date | |
---|---|---|---|
eff9ea139a |
1 changed files with 8 additions and 5 deletions
|
@ -101,8 +101,11 @@ public class MatchWebsocketHandler extends JsonWebsocketHandler {
|
||||||
objectMapper.readValue(payload, RequestTowerPlacingMessage.class);
|
objectMapper.readValue(payload, RequestTowerPlacingMessage.class);
|
||||||
Player opponent;
|
Player opponent;
|
||||||
try {
|
try {
|
||||||
opponent =
|
opponent =this.matchService.placeTower(
|
||||||
this.matchService.placeTower(this.sessionPlayers.get(session), msg.getX(), msg.getY());
|
this.sessionPlayers.get(session),
|
||||||
|
msg.getX(),
|
||||||
|
msg.getY()
|
||||||
|
);
|
||||||
} catch (InvalidPlacementException exception) {
|
} catch (InvalidPlacementException exception) {
|
||||||
new InvalidPlacementMessage(msg.getX(), msg.getY(), exception.getReason()).send(session);
|
new InvalidPlacementMessage(msg.getX(), msg.getY(), exception.getReason()).send(session);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue