title: Issue with calling function and returning correct char
body: <p>Basically what i am creating is a simple game where the user defines the grid sizes and the clicks on boxes to collect points, there are three options Prize= 200 points, Bandit= -100 points and bomb= -10000(which will end the game). </p>
  
  <p>The problem I am getting is when the user selects a box a bomb comes up its only subtracting 100 points like it would if the user selected bandit</p>
  
  <p>BlockHop:  </p>
  
  <pre><code>import java.util.*;
  
  public class BlockHop{
    Random rand = new Random();
    private GameItems[][] board;
    public static int score = 0;
  
    public BlockHop(){
      board = new GameItems[1][1];
      board[0][0] = new Prize(0, 0, 'P');
    }
    public BlockHop(int gridSize) {
      board = new GameItems[gridSize][gridSize];
      int end = 10;
      int start = 1;
      for (int row = 0; row &lt; board.length; row++){
        for (int col = 0; col &lt; board[row].length; col++){
          int num = rand.nextInt(end - start + 1) + start;
          switch (num){
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            board[row][col] = new Prize(row, col, 'P');
            break;
            case 7:
            board[row][col] = new Bomb(row, col, 'X');
            break;
            case 8:
            case 9:
            case 10:
            board[row][col] = new Bandit(row, col, 'B');
            break;
          }
        }
      }
    }
    public void play(int row, int col){
      String newID = getLabel(row, col);
      board[row][col].adjustScore(newID.charAt(0));
    }
    public int getScore(){
      return score;
    }
    public String getLabel(int row, int col){
      if ((board[row][col]).equals('P')){
        return "PRIZE!";
      }
      else if ((board[row][col]).equals('X')){
        return "Bomb!";
      }
      else{
        return "Bandit!";
      }
    }
    public boolean isGameOver(){
        return getScore() &lt; 0;
    }
  }
  </code></pre>
  
  <p>GameItems:</p>
  
  <pre><code>public abstract class GameItems {
  
    private final char ID;
    private final int row;      
    private final int col;    
    public GameItems(){
      row = 0;
      col = 0;
      ID = ' ';
    }
    public GameItems(int newRow, int newCol, char newId){
      row = newRow;
      col = newCol;
      ID = newId;
      }
    boolean equals(char c){
      return c == ID;
      }
    public int adjustScore(char input){
      switch (input){
        case 'P':
          BlockHop.score += 200;
          break;
        case 'X':
          BlockHop.score -= -10000;
          break;
        case 'B':
          BlockHop.score -= 100;
          break;
      }
      return BlockHop.score;
    }
  }
  </code></pre>
  
  <p>BlockHopGUI:</p>
  
  <pre><code>import java.util.*;
  import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;
  
  public class BlockHopGUI extends JFrame{
  
    private BlockHop bh;
    private JButton [][] board;
    private JLabel scorePoints;
    private PlayHandler ph;  // listener for buttons
  
    public BlockHopGUI( int gridSize ) {
      super( "Click to uncover prizes" );
      bh = new BlockHop( gridSize );
      System.out.println( "gridsize: " + gridSize );
      Container c = getContentPane( );
      JPanel p = new JPanel( );
      board = new JButton[gridSize][gridSize];
      p.setLayout( new GridLayout( gridSize, gridSize ) );
  
      ph = new PlayHandler( );
      for ( int row = 0; row &lt; board.length; row++ )
        for ( int col = 0; col &lt; board.length; col++ ) {
            board[row][col] = new JButton( "" );
            board[row][col].addActionListener(ph);
            p.add( board[row][col] );
      }
      c.add( p, BorderLayout.CENTER );
  
      JPanel scorePanel = new JPanel( );
      JLabel scoreLabel = new JLabel( "Score: " );
      scorePoints = new JLabel( Integer.toString( bh.getScore( ) ) );
      scorePanel.add( scoreLabel );
      scorePanel.add( scorePoints );
  
      c.add( scorePanel, BorderLayout.SOUTH );
  
      setSize( 500, 500 );
      setVisible( true );  
    }
  
    private class PlayHandler implements ActionListener {
      public void actionPerformed( ActionEvent ae ) {
        for ( int row = 0; row &lt; board.length; row++ )
          for ( int col = 0; col &lt; board[0].length; col++ ) {
          if ( ae.getSource( ) == board[row][col] ) {
               bh.play( row, col );
               board[row][col].setText( bh.getLabel( row, col ) );
               board[row][col].removeActionListener( ph );
               break;
          }
        }
        scorePoints.setText(  Integer.toString( bh.getScore( ) ) );
        if ( bh.isGameOver( ) ) {
          JOptionPane.showMessageDialog( null, "Game over! Final points: "
                                          + bh.getScore( ) );
          System.exit( 1 );  
        }
      }
    }
    public static void main( String [] args ) {
      int gridSize = Integer.parseInt(
                  JOptionPane.showInputDialog( null, "Enter the grid size" ) );
      BlockHopGUI bhg = new BlockHopGUI( gridSize );
      bhg.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }
  }
  </code></pre>