public void keyPressed(KeyEvent e) {
        /* Pressing a key in the title screen starts a game */
        if (board.titleScreenB) {
            board.titleScreenB = false;
            return;
        }
        /* Pressing a key in the win screen or game over screen goes to the title screen */
        else if (board.winScreenB || board.overScreenB) {
            board.titleScreenB = true;
            board.winScreenB = false;
            board.overScreenB = false;
            return;
        }
        /* Pressing a key during a demo kills the demo mode and starts a new game */
        else if (board.demo) {
            board.demo = false;
            board.newGame();
            return;
        }

        /* Otherwise, key presses control the player! */
        switch (e.getKeyCode()) {
            case KeyEvent.VK_LEFT:
                board.player.desiredDirection = 'L';
                break;
            case KeyEvent.VK_RIGHT:
                board.player.desiredDirection = 'R';
                break;
            case KeyEvent.VK_UP:
                board.player.desiredDirection = 'U';
                break;
            case KeyEvent.VK_DOWN:
                board.player.desiredDirection = 'D';
                break;
        }

        repaint();
    }