@Override
    public void actionPerformed(ActionEvent e) {
    	String actionName = e.getActionCommand();
    	int newBoard = -1;
    	if(actionName == "Undo Move"){
        	board.undoMove(1);
            check = false;
    	}
    	else if(actionName == "New Game"){
        	newGameScreen();
    	}
    	else if(actionName == "Restart"){
        	newBoard = checkAction("Restart");
        	if(newBoard == 0){
        		newBoard = JOptionPane.showConfirmDialog(game, "Player " + (board.getCurrentPlayer()+1)%2 + " okay with game restart?", "check restart", JOptionPane.YES_NO_OPTION);
        	}
    	}
    	else if(actionName == "Forfeit"){
        	newBoard = checkAction("Forfeit");
        	if(newBoard == 0){
        		if(board.getCurrentPlayer() == 0) this.changeScore(1, true);
        		else changeScore(0, true);
        	}
    	}
    	if(newBoard == 0){
    		endGameOptions("Game ended by user");
    	}
        this.repaint();
    }