<commit_before>package;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.text.FlxText;
import flixel.ui.FlxButton;
import flixel.math.FlxMath;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;

class MenuState extends FlxState
{
  private var continue_delay:Int = 1; // don't allow rapid continue while holding buttons
  private var allow_continue:Bool; // don't allow rapid continue while holding buttons
  private var continue_timer:FlxTimer; // don't allow rapid continue while holding buttons
  private var ready_text:FlxText; // don't allow rapid continue while holding buttons
  private var countdown_timer:FlxTimer;
  private var countdown_seconds:Int = 3;

	override public function create():Void
	{
		super.create();
    bgColor = Main.BACKGROUND_GREY;

    var titleImage = new FlxSprite();
    titleImage.loadGraphic( AssetPaths.INSTRUCTION_SCREEN );
    titleImage.scale.set(0.5, 0.5);
    titleImage.screenCenter();
    add( titleImage );

    continue_timer = new FlxTimer();
    continue_timer.start(continue_delay, function(t){
      allow_continue = true;

      ready_text = new FlxText( 400, 600, Std.string( "READY?" ) );
      ready_text.setFormat( "Arial", 30, Main.FONT_BLUE, FlxTextAlign.CENTER, FlxTextBorderStyle.SHADOW, FlxColor.BLACK, true);
      add( ready_text );

    });

	}

  private inline function start_countdown():Void
  {
    countdown_timer = new FlxTimer();
    countdown_timer.start(countdown_seconds, function(t){
      FlxG.switchState( new PlayState() );
    });
  }

	override public function update(elapsed:Float):Void
	{
    if( allow_continue && countdown_timer == null && FlxG.keys.getIsDown().length > 0 ){
      start_countdown();
    }

    if( countdown_timer != null ){
      ready_text.text = Std.string(Std.int(countdown_timer.timeLeft));
    }

		super.update(elapsed);
	}
}<commit_msg>remove "continue" delay for MenuState<commit_after>package;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.text.FlxText;
import flixel.ui.FlxButton;
import flixel.math.FlxMath;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;

class MenuState extends FlxState
{
  private var ready_text:FlxText; // don't allow rapid continue while holding buttons
  private var countdown_timer:FlxTimer;
  private var countdown_seconds:Int = 3;

	override public function create():Void
	{
		super.create();
    bgColor = Main.BACKGROUND_GREY;

    var titleImage = new FlxSprite();
    titleImage.loadGraphic( AssetPaths.INSTRUCTION_SCREEN );
    titleImage.scale.set(0.5, 0.5);
    titleImage.screenCenter();
    add( titleImage );

    ready_text = new FlxText( 400, 600, Std.string( "READY?" ) );
    ready_text.setFormat( "Arial", 30, Main.FONT_BLUE, FlxTextAlign.CENTER, FlxTextBorderStyle.SHADOW, FlxColor.BLACK, true);
    add( ready_text );

	}

  private inline function start_countdown():Void
  {
    countdown_timer = new FlxTimer();
    countdown_timer.start(countdown_seconds, function(t){
      FlxG.switchState( new PlayState() );
    });
  }

	override public function update(elapsed:Float):Void
	{
    if( countdown_timer == null && FlxG.keys.getIsDown().length > 0 ){
      start_countdown();
    }

    if( countdown_timer != null ){
      ready_text.text = Std.string(Std.int(countdown_timer.timeLeft));
    }

		super.update(elapsed);
	}
}
{'fraction_non_alphanumeric': 0.11160449970396684, 'fraction_numerical': 0.008584961515689757, 'mean_word_length': 4.127465857359636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1505909', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1115, 'n_words': 245}