public class Coordinate()
{
int[][] myCoordinateList = new int[5][2];
public void test(){
myCoordinateList[0][0] = 1;
myCoordianteList[0][1] = 0;
/*
2 0
3 0
4 0
59 0
60 0
*/
}
public boolean isPassable(int x, int y){
for(int i = 0; i < myCoordinateList.length; i++)
{
if(myCoordinateList[i] == x)
{
for(int j = 0; j < myCoordinateList[0].length; j++)
{
if(myCoordinateList[j] == y) //the coordinate is in the nopass list
return false;
}
}
}
//if we're here, we've iterated through and not found the coordinate in nopass
return true;
}
}