Creature.java
public boolean canGoTo(int i, int j)
    {
        //you can subtract or add from one or the other of the two coordinates but not both. (4 cases)
        if (getY() == j)
        {
            //check x
            if ((getX() - 1) == i)
            {
                if ((i <= (maze.SIZE - 1)) && (i >= 0)) //not out of bounds
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
            else if ((getX() + 1) == i)
            {
                if ((i <= (maze.SIZE - 1)) && (i >= 0)) //not out of bounds
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
        }
        else if (getX() == i)
        {
            if ((getY() - 1) == j)
            {
                if ((j <= (maze.SIZE - 1)) && (j >= 0)) //not out of bounds
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
            else if ((getY() + 1) == j)
            {
                if ((j <= (maze.SIZE - 1)) && (j >= 0)) //not out of bounds
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
        }
        return false;
    }
/**
     * Tests to see if the move is valid: can't go outside the bounds, 
     * and can't jump or move diagonally.
     * 
     * @param i The x value of where you want the creature to go.
     * @param j The y value of where you want the creature to go.
     * @return true if the creature can move there.
     */
Tests to see if the move is valid: can't go outside the bounds,
and can't jump or move diagonally.

@param i The x value of where you want the creature to go.
@param j The y value of where you want the creature to go.
@return true if the creature can move there.
Tests to see if the move is valid : can ' t go outside the bounds and can ' t jump or move diagonally . @param i The x value of where you want the creature to go . @param j The y value of where you want the creature to go . @return true if the creature can move there .
public boolean canGoTo(int i, int j)
    {
        if (getY() == j)
        {
            if ((getX() - 1) == i)
            {
                if ((i <= (maze.SIZE - 1)) && (i >= 0)) 
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
            else if ((getX() + 1) == i)
            {
                if ((i <= (maze.SIZE - 1)) && (i >= 0)) 
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
        }
        else if (getX() == i)
        {
            if ((getY() - 1) == j)
            {
                if ((j <= (maze.SIZE - 1)) && (j >= 0)) 
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
            else if ((getY() + 1) == j)
            {
                if ((j <= (maze.SIZE - 1)) && (j >= 0)) 
                {
                    if(maze.grid[i][j] == null) {
                        return true;
                    }
                    else if(maze.grid[i][j].getLetter() != "W") {
                        return true;
                    }
                }
            }
        }
        return false;
    }
public boolean canGoTo ( int i , int j ) { if ( getY ( ) == j ) { if ( ( getX ( ) - 1 ) == i ) { if ( ( i <= ( maze . SIZE - 1 ) ) && ( i >= 0 ) ) { if ( maze . grid [ i ] [ j ] == null ) { return true ; } else if ( maze . grid [ i ] [ j ] . getLetter ( ) != "W" ) { return true ; } } } else if ( ( getX ( ) + 1 ) == i ) { if ( ( i <= ( maze . SIZE - 1 ) ) && ( i >= 0 ) ) { if ( maze . grid [ i ] [ j ] == null ) { return true ; } else if ( maze . grid [ i ] [ j ] . getLetter ( ) != "W" ) { return true ; } } } } else if ( getX ( ) == i ) { if ( ( getY ( ) - 1 ) == j ) { if ( ( j <= ( maze . SIZE - 1 ) ) && ( j >= 0 ) ) { if ( maze . grid [ i ] [ j ] == null ) { return true ; } else if ( maze . grid [ i ] [ j ] . getLetter ( ) != "W" ) { return true ; } } } else if ( ( getY ( ) + 1 ) == j ) { if ( ( j <= ( maze . SIZE - 1 ) ) && ( j >= 0 ) ) { if ( maze . grid [ i ] [ j ] == null ) { return true ; } else if ( maze . grid [ i ] [ j ] . getLetter ( ) != "W" ) { return true ; } } } } return false ; }
Tests to see if the move is valid: can't go outside the bounds,
 and can't jump or move diagonally.
Tests to see if the move is valid : can ' t go outside the bounds and can ' t jump or move diagonally .
//you can subtract or add from one or the other of the two coordinates but not both. (4 cases) //check x //not out of bounds //not out of bounds //not out of bounds //not out of bounds