@Override
  public boolean edit( int X, int Y ){
    boolean flag = super.edit(X,Y);
    if( !flag ){
      X -= LabyrinthDrawer.MARGIN;
      Y -= LabyrinthDrawer.MARGIN;
      int x = X/LabyrinthDrawer.CELL_SIZE;
      int y = Y/LabyrinthDrawer.CELL_SIZE;
      switch( option ){
        case AGENT:
          setAgentPosition( agent_id, x, y, 0 );
        break;
        case TREASURE:
          if( (structure[tx][ty] & (1<<4)) == (1<<4) )
            structure[tx][ty] ^= (1<<4);
          structure[x][y] ^= (1<<4);
          tx = x;
          ty = y;
        break;
      }
    }
    return flag;
  }