PacmanMaze.java
public boolean hasWon()
    {
        // if all dots are gone. (all grid are true)
        for(int j = 0; j < SIZE; j++)
        {
            for(int i = 0; i < SIZE; i++)
            {
                if (grid[i][j] != null) {
                    if(grid[i][j].getLetter().equals("D"))
                    {
                        return false;
                    }
                }
            }
        }
        return true;          
    }
/**
     * Has Pacman eaten all the dots yet.
     * @return true if Pacman has eaten all the dots.
     */
Has Pacman eaten all the dots yet.
@return true if Pacman has eaten all the dots.
Has Pacman eaten all the dots yet . @return true if Pacman has eaten all the dots .
public boolean hasWon()
    {
        for(int j = 0; j < SIZE; j++)
        {
            for(int i = 0; i < SIZE; i++)
            {
                if (grid[i][j] != null) {
                    if(grid[i][j].getLetter().equals("D"))
                    {
                        return false;
                    }
                }
            }
        }
        return true;          
    }
public boolean hasWon ( ) { for ( int j = 0 ; j < SIZE ; j ++ ) { for ( int i = 0 ; i < SIZE ; i ++ ) { if ( grid [ i ] [ j ] != null ) { if ( grid [ i ] [ j ] . getLetter ( ) . equals ( "D" ) ) { return false ; } } } } return true ; }
Has Pacman eaten all the dots yet.
Has Pacman eaten all the dots yet .
// if all dots are gone. (all grid are true)