public void updateLayout() {
        switch (state) {
            case 0:
                newGame.setVisible(true);
                loadGame.setVisible(true);
                options.setVisible(true);
                break;
            case 1:
                newGame.setVisible(false);
                loadGame.setVisible(false);
                options.setVisible(false);
                break;
            case 2:
                newGame.setVisible(false);
                loadGame.setVisible(false);
                options.setVisible(false);
                break;
            case 3:
                newGame.setVisible(false);
                loadGame.setVisible(false);
                options.setVisible(false);
                break;
            case 4:
                break;
            default:
                throw new IllegalStateException("State is not a valid value");
        }
        repaint();
        revalidate();
    }