Skip to content

Commit

Permalink
branch creation for checkifpathexists #135, i'm basically done with t…
Browse files Browse the repository at this point in the history
…he idea behind checking if the path exists
  • Loading branch information
Diyuse authored and amasciotra committed Dec 1, 2019
1 parent cc6786d commit 549ec87
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Empty file modified gradlew
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,22 @@ public static Boolean validatePosition(GamePosition gamePosition) {
return true;
}

public static Boolean pathExistenceCheck(){
//check if row is blocked by walls, basically i need to check the pos of the player and get all the walls above the player
//above meaning in front when going towards their own destinations
//need to somehow get the destination of each player and get the current position of the player + the directionality
//so an interval from player position to destination position, i check the row for horizontal and column for vertical
//how to get walls now, prolly gonna do the same as i did in validate position and get all the walls into a list,
//nah this is stupid, it would require for me to loop thru to much shit every time
//maybe incorporate this function into validateposition
//So whenever u place a wall, check all the walls with the same values of row or column, then add to some count,
//when the count reaches 4 or 5 and the value is between the interval, then there is no path
//how would this work with load position or load game,
//it would only work if they load one move at a time, or one wall at a time, which is probably has to
//i think this is good for now
return true;
}


//Getter for gamestate

Expand Down

0 comments on commit 549ec87

Please sign in to comment.