#ifndef PLAYER_H
#define PLAYER_H

#include <stdbool.h>
#include "monopoly_board.h"

#define MAX_PLAYERS 4
#define MAX_PROPERTIES 40

typedef struct {
    int id;                 // Player number (0-3)
    const char* name;       // Player display name
    int balance;            // Current cash
    int position;           // Current index on the MONOPOLY_BOARD (0-39)
    
    // Status flags
    bool is_in_jail;
    int jail_turns;         // How many turns they've spent in jail
    int jail_free_cards;    // Get Out of Jail Free cards
    bool is_bankrupt;
    
    // Inventory
    int properties_owned[MAX_PROPERTIES]; // Indices of owned tiles
    int property_count;
    
    // Piece representation
    const char* token;      // e.g., "Top Hat", "Iron"
} Player;

/**
 * Initializes a player with starting values
 */
#ifdef __cplusplus
extern "C" {
#endif
void init_player(Player* p, int id, const char* name, const char* token);
#ifdef __cplusplus
}
#endif

#endif