// src/game/state.h
#pragma once
#include "mbed.h"
#include "../assets/character_frames.h"

constexpr auto CRAWL_DURATION = 300ms;

enum class PlayerState { Walk1, Walk2, Crawl1 };

class WalkingState {
private:
  PlayerState current_state = PlayerState::Walk1;
  Timer state_timer;

public:
  // MOVED FROM loop.cpp
  // Update state (handles crawl timeout)
  void update();
  
  // State transitions
  void start_crawl();
  void toggle_walk_frame();
  
  // Getters
  PlayerState get_state() const { return current_state; }
  CharacterFrame get_character_frame() const;
};
