@Override
  public void actionPerformed(ActionEvent e) {
    Pattern p1 = Pattern.compile("move:(\\d)/(\\d)");
    Pattern p2 = Pattern.compile("addPlayer:(\\s)");
    Matcher m1 = p1.matcher(e.getActionCommand());
    Matcher m2 = p2.matcher(e.getActionCommand());
    
    if(m1.find()) {
      Piece piece = othello.getNextPiece();
      piece.setLocation(Integer.parseInt(m1.group(1)), Integer.parseInt(m1.group(2)));
      
      othello.getBoard().makeMove(piece);
    } else if(e.getActionCommand().equals("newGame")) {
      // Remove any old AI's that are running.
      clearAIs();
      
      Player player1 = getNewPlayer("Player 1");
      Player player2 = getNewPlayer("Player 2");
      
      this.othello.clearGame();
      this.othello.addPlayer(player1);
      this.othello.addPlayer(player2);
      this.othello.startGame();
    } else if(e.getActionCommand().equals("quitGame")) {
      System.exit(0);
    } else if(m2.find()) {
      this.othello.addPlayer(new Player(m2.group(1)));
    }
  }