<commit_before>package me.otisdiver.otisarena.game;

import org.bukkit.Bukkit;

public enum GameState {
    
    // finite state machine - event handlers will run different code depending on which part of the game we're in
    
    // recruiting players - nothing happening, just waiting to hit min. player count
    RECRUITING,
    
    // enough players - giving them 20 (+2) seconds to get ready for the game to start
    PREPARING,
    
    // loading the world, teleporting players in
    LOADING,
    
    // counting down - until gameplay starts
    STARTING,
    
    // gameplay - waiting for victory conditions to be met
    PLAYING,
    
    // unloading the world, returning to lobby
    UNLOADING;
    
    // single (static) variable of what state the game is in
    private static GameState current = RECRUITING;
    
    /* Returns the current game state. */
    public static GameState getCurrent() {
        return current;
    }
    
    /* Manually sets the current game state. */
    public static void setCurrent(GameState state) {
        
        if (state == null) return;
        current = state;
    }
    
    /* Moves the current game state to the next state. */
    public static void advance() {
        switch (current) {
            // each case runs setCurrent for the next value in the finite state machine
            case RECRUITING:
                setCurrent(PREPARING);
            case PREPARING:
                setCurrent(LOADING);
            case LOADING:
                setCurrent(STARTING);
            case STARTING:
                setCurrent(PLAYING);
            case PLAYING:
                setCurrent(UNLOADING);
            case UNLOADING:
                setCurrent(RECRUITING);
        }
        
        // debug message
        Bukkit.getLogger().info("Game is now " + current);
    }

}<commit_msg>fix GameState:advance - forgot breaks in switch<commit_after>package me.otisdiver.otisarena.game;

import org.bukkit.Bukkit;

public enum GameState {
    
    // finite state machine - event handlers will run different code depending on which part of the game we're in
    
    // recruiting players - nothing happening, just waiting to hit min. player count
    RECRUITING,
    
    // enough players - giving them 20 (+2) seconds to get ready for the game to start
    PREPARING,
    
    // loading the world, teleporting players in
    LOADING,
    
    // counting down - until gameplay starts
    STARTING,
    
    // gameplay - waiting for victory conditions to be met
    PLAYING,
    
    // unloading the world, returning to lobby
    UNLOADING;
    
    // single (static) variable of what state the game is in
    private static GameState current = RECRUITING;
    
    /* Returns the current game state. */
    public static GameState getCurrent() {
        return current;
    }
    
    /* Manually sets the current game state. */
    public static void setCurrent(GameState state) {
        
        if (state == null) return;
        current = state;
    }
    
    /* Moves the current game state to the next state. */
    public static void advance() {
        switch (current) {
            // each case runs setCurrent for the next value in the finite state machine
            case RECRUITING:
                setCurrent(PREPARING);
            break;
            case PREPARING:
                setCurrent(LOADING);
            break;
            case LOADING:
                setCurrent(STARTING);
            break;
            case STARTING:
                setCurrent(PLAYING);
            break;
            case PLAYING:
                setCurrent(UNLOADING);
            break;
            case UNLOADING:
                setCurrent(RECRUITING);
            break;
        }
        
        // debug message
        Bukkit.getLogger().info("Game is now " + current);
    }

}
{'fraction_non_alphanumeric': 0.06828763579927574, 'fraction_numerical': 0.0015519917227108122, 'mean_word_length': 1.7425531914893617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '933447', 'n_tokens_mistral': 1043, 'n_tokens_neox': 989, 'n_words': 365}