Skip to content
Snippets Groups Projects
Commit 88567d42 authored by tjsus's avatar tjsus
Browse files

Assignment 3 code modified to add comment PDU to update player 1 and player 2 grids.

parent 71d7008a
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ public class ExampleSimulationProgram {
// Constants for the Battleship game
private static final int GRID_SIZE = 10; // 10x10 grid for Battleship
private static final int MAX_TURNS = 100; // Limit turns to avoid infinite games
private static final int MAX_TURNS = 200; // Limit turns to avoid infinite games
// Grids for each player
private char[][] player1Grid = new char[GRID_SIZE][GRID_SIZE];
......@@ -28,7 +28,7 @@ public class ExampleSimulationProgram {
// Ship positions (simple example positions for each player's ships)
private final int[][] player1Ships = {{0, 0}, {0, 1}, {0, 2}}; // Positions for player 1's ships
private final int[][] player2Ships = {{5, 5}, {5, 6}, {5, 7}}; // Positions for player 2's ships
private final int[][] player2Ships = {{2, 5}, {2, 6}, {2, 7}}; // Positions for player 2's ships
// DIS utilities
private String descriptor = this.getClass().getSimpleName();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment