private void createCommands() {
        commandMap = new HashMap<>();
        commandMap.put("StartGame", new Command() {
            @Override
            public void executeCommand() {
                optionDialog.hidDialog();
                imageViewerControl.reset();
                runApplication();
            }
        });

        commandMap.put("PlayAgain", new Command() {
            @Override
            public void executeCommand() {
                youWinDialog.hidDialog();
                imageViewerControl.reset();
                runApplication();
            }
        });

        commandMap.put("Options", new Command() {
            @Override
            public void executeCommand() {
                optionDialog.showDialog();
            }
        });

        commandMap.put("NewGame", new Command() {
            @Override
            public void executeCommand() {
                if (gameOverDialog != null) gameOverDialog.hidDialog();
                imageViewerControl.reset();
                runApplication();
            }
        });

        commandMap.put("Help", new Command() {
            @Override
            public void executeCommand() {
                Dialog help = createHelpDialog();
                help.showDialog();
            }
        });

        commandMap.put("Restart", new Command() {
            @Override
            public void executeCommand() {
                gameOverDialog.hidDialog();
                imageViewerControl.reset();
                imageViewerControl.viewImage("waitIcon.jpg");
                applicationFrame.getBoardViewer().restart();
            }
        });

        commandMap.put("YouWin", new Command() {
            @Override
            public void executeCommand() {
                if (youWinDialog == null) youWinDialog = createWinnerDialog();
                imageViewerControl.viewImage("winnerIcon.jpg");
                youWinDialog.showDialog();
            }
        });

        commandMap.put("GameOver", new Command() {
            @Override
            public void executeCommand() {
                if (gameOverDialog == null) gameOverDialog = createOverDialog();
                imageViewerControl.viewImage("loserIcon.jpg");
                gameOverDialog.showDialog();
            }
        });

        commandMap.put("CellViewerSelected", new Command() {
            @Override
            public void executeCommand() {
                imageViewerControl.viewImage("moveIcon.jpg");
            }
        });

        commandMap.put("CellViewerUnselected", new Command() {
            @Override
            public void executeCommand() {
                imageViewerControl.viewImage("waitIcon.jpg");
            }
        });

        commandMap.put("Exit", new Command() {
            @Override
            public void executeCommand() {
                System.exit(0);
            }
        });
    }