@Override
    protected void update(float delta) {
        if (mInput.action() && !start) {
            mCodeoutput.setText(mCode.getCode());
            start = true;
            updateOutput();
            Timer.schedule(task, 1f, 1f);
        }

        if ((mCode.isFinished() || mRemainingTime <= 0) && !mDoneHandled) {
            ScoreHandler.updateScore(ScoreHandler.CODE, mCode.getGrade(mScore));
            game.setScreen(new CoderacerEndScreen(game, mCode.getGrade(mScore)));
            mDoneHandled = true;
        } else if (!mDoneHandled) {
            mTimeLabel.setText(mRemainingTime + "");
        }
    }