#ifndef MONOPOLY_BOARD_H
#include <stddef.h>
#define MONOPOLY_BOARD_H

#include <stdbool.h>

typedef enum {
  TILE_GO,
  TILE_PROPERTY,
  TILE_COMMUNITY_CHEST,
  TILE_TAX,
  TILE_RAILROAD,
  TILE_CHANCE,
  TILE_JAIL,
  TILE_UTILITY,
  TILE_FREE_PARKING,
  TILE_GO_TO_JAIL
} TileType;

typedef struct {
  const char *name;
  TileType type;
  bool is_corner;
  int cost;          // 0 if not applicable
  const char *color; // Hex string, NULL if not property
  int rent[6];       // Base, 1H, 2H, 3H, 4H, Hotel
  int group[3];      // Group ID, Position in group, Total in group
  int house_cost;    // Cost to build
} BoardTile;

#define MONOPOLY_BOARD_SIZE 40

static const BoardTile MONOPOLY_BOARD[MONOPOLY_BOARD_SIZE] = {
    {"Go", TILE_GO, true, 0, NULL, {0}, {0}, 0},
    {"Mediterranean Avenue",
     TILE_PROPERTY,
     false,
     60,
     "#955438",
     {2, 10, 30, 90, 160, 250},
     {1, 1, 2},
     50},
    {"Community Chest", TILE_COMMUNITY_CHEST, false, 0, NULL, {0}, {0}, 0},
    {"Baltic Avenue",
     TILE_PROPERTY,
     false,
     60,
     "#955438",
     {4, 20, 60, 180, 320, 450},
     {1, 2, 2},
     50},
    {"Income Tax", TILE_TAX, false, 200, NULL, {0}, {0}, 0},
    {"Reading Railroad", TILE_RAILROAD, false, 200, NULL, {0}, {9, 1, 4}, 0},
    {"Rhode Island Avenue",
     TILE_PROPERTY,
     false,
     100,
     "#aae0fa",
     {6, 30, 90, 270, 400, 550},
     {2, 1, 3},
     50},
    {"Chance", TILE_CHANCE, false, 0, NULL, {0}, {0}, 0},
    {"Vermont Avenue",
     TILE_PROPERTY,
     false,
     100,
     "#aae0fa",
     {6, 30, 90, 270, 400, 550},
     {2, 2, 3},
     50},
    {"Connecticut Avenue",
     TILE_PROPERTY,
     false,
     120,
     "#aae0fa",
     {8, 40, 100, 300, 450, 600},
     {2, 3, 3},
     50},
    {"Jail", TILE_JAIL, true, 0, NULL, {0}, {0}, 0},
    {"St. Charles Place",
     TILE_PROPERTY,
     false,
     140,
     "#d93a96",
     {10, 50, 150, 450, 625, 750},
     {3, 1, 3},
     100},
    {"Electric Company", TILE_UTILITY, false, 150, NULL, {0}, {10, 1, 2}, 0},
    {"States Avenue",
     TILE_PROPERTY,
     false,
     140,
     "#d93a96",
     {10, 50, 150, 450, 625, 750},
     {3, 2, 3},
     100},
    {"Virginia Avenue",
     TILE_PROPERTY,
     false,
     160,
     "#d93a96",
     {12, 60, 180, 500, 700, 900},
     {3, 3, 3},
     100},
    {"Pennsylvania Railroad",
     TILE_RAILROAD,
     false,
     200,
     NULL,
     {0},
     {9, 2, 4},
     0},
    {"St. James Place",
     TILE_PROPERTY,
     false,
     180,
     "#f7941d",
     {14, 70, 200, 550, 750, 950},
     {4, 1, 3},
     100},
    {"Community Chest", TILE_COMMUNITY_CHEST, false, 0, NULL, {0}, {0}, 0},
    {"Tennessee Avenue",
     TILE_PROPERTY,
     false,
     180,
     "#f7941d",
     {14, 70, 200, 550, 750, 950},
     {4, 2, 3},
     100},
    {"New York Avenue",
     TILE_PROPERTY,
     false,
     200,
     "#f7941d",
     {16, 80, 220, 600, 800, 1000},
     {4, 3, 3},
     100},
    {"Free Parking", TILE_FREE_PARKING, true, 0, NULL, {0}, {0}, 0},
    {"Kentucky Avenue",
     TILE_PROPERTY,
     false,
     220,
     "#ed1b24",
     {18, 90, 250, 700, 875, 1050},
     {5, 1, 3},
     150},
    {"Chance", TILE_CHANCE, false, 0, NULL, {0}, {0}, 0},
    {"Indiana Avenue",
     TILE_PROPERTY,
     false,
     220,
     "#ed1b24",
     {18, 90, 250, 700, 875, 1050},
     {5, 2, 3},
     150},
    {"Illinois Avenue",
     TILE_PROPERTY,
     false,
     240,
     "#ed1b24",
     {20, 100, 300, 750, 925, 1100},
     {5, 3, 3},
     150},
    {"B. & O. Railroad", TILE_RAILROAD, false, 200, NULL, {0}, {9, 3, 4}, 0},
    {"Atlantic Avenue",
     TILE_PROPERTY,
     false,
     260,
     "#fef200",
     {22, 110, 330, 800, 975, 1150},
     {6, 1, 3},
     150},
    {"Ventnor Avenue",
     TILE_PROPERTY,
     false,
     260,
     "#fef200",
     {22, 110, 330, 800, 975, 1150},
     {6, 2, 3},
     150},
    {"Water Works", TILE_UTILITY, false, 150, NULL, {0}, {10, 2, 2}, 0},
    {"Marvin Gardens",
     TILE_PROPERTY,
     false,
     280,
     "#fef200",
     {24, 120, 360, 850, 1025, 1200},
     {6, 3, 3},
     150},
    {"Go To Jail", TILE_GO_TO_JAIL, true, 0, NULL, {0}, {0}, 0},
    {"Pacific Avenue",
     TILE_PROPERTY,
     false,
     300,
     "#1fb25a",
     {26, 130, 390, 900, 1100, 1275},
     {7, 1, 3},
     200},
    {"North Carolina Avenue",
     TILE_PROPERTY,
     false,
     300,
     "#1fb25a",
     {26, 130, 390, 900, 1100, 1275},
     {7, 2, 3},
     200},
    {"Community Chest", TILE_COMMUNITY_CHEST, false, 0, NULL, {0}, {0}, 0},
    {"Pennsylvania Avenue",
     TILE_PROPERTY,
     false,
     320,
     "#1fb25a",
     {28, 150, 450, 1000, 1200, 1400},
     {7, 3, 3},
     200},
    {"Short Line", TILE_RAILROAD, false, 200, NULL, {0}, {9, 4, 4}, 0},
    {"Chance", TILE_CHANCE, false, 0, NULL, {0}, {0}, 0},
    {"Park Place",
     TILE_PROPERTY,
     false,
     350,
     "#0072bb",
     {35, 175, 500, 1100, 1300, 1500},
     {8, 1, 2},
     200},
    {"Luxury Tax", TILE_TAX, false, 100, NULL, {0}, {0}, 0},
    {"Boardwalk",
     TILE_PROPERTY,
     false,
     400,
     "#0072bb",
     {50, 200, 600, 1400, 1700, 2000},
     {8, 2, 2},
     200}};

#endif