game-end-stuff #29

Merged
lgc merged 3 commits from game-end-stuff into main 2024-12-23 22:13:58 +00:00
1 changed files with 1 additions and 0 deletions
Showing only changes of commit 1b08b39105 - Show all commits

View File

@ -174,6 +174,7 @@ public class BoardDisplay extends JPanel {
if(currentShip != null) { if(currentShip != null) {
test = currentShip.getVirtualOccupiedPoints(mousePosition, horizontal); test = currentShip.getVirtualOccupiedPoints(mousePosition, horizontal);
} }
if (player == null || player.getBoard() == null) return;
for(int i = 0; i < gridSize; i++) { for(int i = 0; i < gridSize; i++) {
for(int j = 0; j < gridSize; j++) { for(int j = 0; j < gridSize; j++) {
if(fields[i][j] == null) { if(fields[i][j] == null) {