Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Commit

Permalink
Started Update PDDG Method
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymo111 committed Jun 8, 2018
1 parent 568f4e0 commit a8d98bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/AI.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public static int generatePD(int shipLength, int[] distance) {
* Generates the initial population density distributed graph for the given
* number of ships for each square in a given grid. Runs only at the beginning
* of the game.
*
* @param grid
* The grid for which to calculate the initial PDDG
*/
public static void generatePDDG(Square[][] grid) {
int[] distance;
Expand All @@ -46,6 +49,10 @@ public static void generatePDDG(Square[][] grid) {
}
}

public static void updatePPDG() {

}

/**
* Finds the highest likely location of a ship
*
Expand Down Expand Up @@ -201,6 +208,7 @@ public static void placeShips(Square[][] grid, int[] shipLengths) {
* is overlapping another ship
*/
public static boolean checkValidShipPosition(int Y, int X, int endY, int endX, int rotation, Square[][] grid) {

// first we must check to see if the end values are within the board size
if (endX >= grid.length || endX < 0 || endY >= grid[0].length || endY < 0)
return false;
Expand Down

0 comments on commit a8d98bf

Please sign in to comment.