@Override
    public void keyPressed(KeyEvent e) {
        int keys = e.getKeyCode();
        if (keys == KeyEvent.VK_ESCAPE) {

            mainMenuObj.setMx(WINDOW_WIDTH);

            currentMode = mode1;
            ticTacToeFunctionsObj.clearPlayerScores(ticTacToePlayerObj);
            for (int i = 0; i < 10; i++) {
                ticTacToeFunctionsObj.wipeBoard(ticTacToeboardObj, ticTacToePlayerObj, squareStore);
            }
            ticTacToePlayerObj.setTurn(1);
            goFunctionsObj.resetBoard(goBoardObj, goSettingObj, goSquareStore);


        }
        if (currentMode == null ? mode5 == null : currentMode.equals(mode5)) {
            if (keys == KeyEvent.VK_ENTER) {
                goSettingObj.buildBoard();
                currentMode = mode6;
            }
        }
    }