Compare commits
1 commit
eff9ea139a
...
e0f23f31d8
Author | SHA1 | Date | |
---|---|---|---|
e0f23f31d8 |
1 changed files with 5 additions and 8 deletions
|
@ -101,11 +101,8 @@ public class MatchWebsocketHandler extends JsonWebsocketHandler {
|
||||||
objectMapper.readValue(payload, RequestTowerPlacingMessage.class);
|
objectMapper.readValue(payload, RequestTowerPlacingMessage.class);
|
||||||
Player opponent;
|
Player opponent;
|
||||||
try {
|
try {
|
||||||
opponent =this.matchService.placeTower(
|
opponent =
|
||||||
this.sessionPlayers.get(session),
|
this.matchService.placeTower(this.sessionPlayers.get(session), msg.getX(), msg.getY());
|
||||||
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