Mouseville.java
public void resolve()
    {
        int index = 0;
        boolean toRemove = false;
        for (Monster m : monsters)
        {
             if (grid[m.getX()][m.getY()] == null);
             else if (grid[m.getX()][m.getY()].getLetter().equals("T"))
             {
                 grid[m.getX()][m.getY()] = null; //remove trap from grid.
                 index = monsters.indexOf(m); //remove mouse from list.
                 toRemove = true;
             }
        }
        if (toRemove)
        {
            monsters.remove(index); //works only with 1 value right now
        }
        
        System.out.print("\f"); //form feed "clears" the console (at least on Mac).
        print("");
        System.out.print(COMMAND_REQUEST);
    }
/**
     * "Resolves" the new state of the game.
     */
"Resolves" the new state of the game.
" Resolves " the new state of the game .
public void resolve()
    {
        int index = 0;
        boolean toRemove = false;
        for (Monster m : monsters)
        {
             if (grid[m.getX()][m.getY()] == null);
             else if (grid[m.getX()][m.getY()].getLetter().equals("T"))
             {
                 grid[m.getX()][m.getY()] = null; 
                 index = monsters.indexOf(m); 
                 toRemove = true;
             }
        }
        if (toRemove)
        {
            monsters.remove(index); 
        }
        System.out.print("\f"); 
        print("");
        System.out.print(COMMAND_REQUEST);
    }
public void resolve ( ) { int index = 0 ; boolean toRemove = false ; for ( Monster m : monsters ) { if ( grid [ m . getX ( ) ] [ m . getY ( ) ] == null ) ; else if ( grid [ m . getX ( ) ] [ m . getY ( ) ] . getLetter ( ) . equals ( "T" ) ) { grid [ m . getX ( ) ] [ m . getY ( ) ] = null ; index = monsters . indexOf ( m ) ; toRemove = true ; } } if ( toRemove ) { monsters . remove ( index ) ; } System . out . print ( "\f" ) ; print ( "" ) ; System . out . print ( COMMAND_REQUEST ) ; }
"Resolves" the new state of the game.
" Resolves " the new state of the game .
//remove trap from grid. //remove mouse from list. //works only with 1 value right now //form feed "clears" the console (at least on Mac).