Network and Frontend #10

Merged
lgc merged 29 commits from ole into main 2024-12-03 12:13:28 +00:00
1 changed files with 2 additions and 11 deletions
Showing only changes of commit 22950cd155 - Show all commits

View File

@ -11,18 +11,9 @@ public abstract class Player {
this.board = new Board(size); this.board = new Board(size);
} }
public synchronized void receiveShoot(Point point) { public abstract void receiveShoot(Point point);
HitResponse hitResponse = board.getHitResponsOnPoint(point);
if (!(hitResponse == null)){
enemy.receiveHit(hitResponse);
} else {
enemy.receiveHit(this.board.hit(point));
}
}
public synchronized void receiveHit(HitResponse hitResponse) { public abstract void receiveHit(HitResponse hitResponse);
enemy.board.addHits(hitResponse);
}
public void click(Point point) { public void click(Point point) {