The C code picks a starting player via dice roll but doesn't reorder the player array. The parser now tracks _first_player_idx and rotates the players list in get_state() so the UI shows them in actual turn order.
519 lines
No EOL
10 KiB
JSON
519 lines
No EOL
10 KiB
JSON
{
|
|
"players": [
|
|
{
|
|
"name": "alice",
|
|
"number": 1,
|
|
"money": 624,
|
|
"location": 21,
|
|
"inJail": false,
|
|
"jailTurns": 0,
|
|
"doublesCount": 0,
|
|
"getOutOfJailFreeCards": 0
|
|
},
|
|
{
|
|
"name": "bob",
|
|
"number": 2,
|
|
"money": 1229,
|
|
"location": 23,
|
|
"inJail": false,
|
|
"jailTurns": 0,
|
|
"doublesCount": 0,
|
|
"getOutOfJailFreeCards": 0
|
|
},
|
|
{
|
|
"name": "charlie",
|
|
"number": 3,
|
|
"money": -12,
|
|
"location": 24,
|
|
"inJail": false,
|
|
"jailTurns": 0,
|
|
"doublesCount": 0,
|
|
"getOutOfJailFreeCards": 1
|
|
}
|
|
],
|
|
"currentPlayer": 3,
|
|
"squares": [
|
|
{
|
|
"id": 0,
|
|
"name": "=== GO ===",
|
|
"type": "safe"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"name": "Mediterranean ave. (P)",
|
|
"type": "property",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "purple",
|
|
"cost": 60,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "Community Chest i",
|
|
"type": "cc"
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "Baltic ave. (P)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "purple",
|
|
"cost": 60,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "Income Tax",
|
|
"type": "tax"
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "Reading RR",
|
|
"type": "railroad",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "railroad",
|
|
"cost": 200
|
|
},
|
|
{
|
|
"id": 6,
|
|
"name": "Oriental ave. (L)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "lightblue",
|
|
"cost": 100,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 7,
|
|
"name": "Chance i",
|
|
"type": "chance"
|
|
},
|
|
{
|
|
"id": 8,
|
|
"name": "Vermont ave. (L)",
|
|
"type": "property",
|
|
"owner": null,
|
|
"mortgaged": false,
|
|
"group": "lightblue",
|
|
"cost": 100,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 9,
|
|
"name": "Connecticut ave. (L)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "lightblue",
|
|
"cost": 120,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 10,
|
|
"name": "Just Visiting",
|
|
"type": "safe"
|
|
},
|
|
{
|
|
"id": 11,
|
|
"name": "St. Charles pl. (V)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "violet",
|
|
"cost": 140,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 12,
|
|
"name": "Electric Co.",
|
|
"type": "utility",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "utility",
|
|
"cost": 150
|
|
},
|
|
{
|
|
"id": 13,
|
|
"name": "States ave. (V)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "violet",
|
|
"cost": 140,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 14,
|
|
"name": "Virginia ave. (V)",
|
|
"type": "property",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "violet",
|
|
"cost": 160,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 15,
|
|
"name": "Pennsylvania RR",
|
|
"type": "railroad",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "railroad",
|
|
"cost": 200
|
|
},
|
|
{
|
|
"id": 16,
|
|
"name": "St. James pl. (O)",
|
|
"type": "property",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "orange",
|
|
"cost": 180,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 17,
|
|
"name": "Community Chest ii",
|
|
"type": "cc"
|
|
},
|
|
{
|
|
"id": 18,
|
|
"name": "Tennessee ave. (O)",
|
|
"type": "property",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "orange",
|
|
"cost": 180,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 19,
|
|
"name": "New York ave. (O)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "orange",
|
|
"cost": 200,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 20,
|
|
"name": "Free Parking",
|
|
"type": "safe"
|
|
},
|
|
{
|
|
"id": 21,
|
|
"name": "Kentucky ave. (R)",
|
|
"type": "property",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "red",
|
|
"cost": 220,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 22,
|
|
"name": "Chance ii",
|
|
"type": "chance"
|
|
},
|
|
{
|
|
"id": 23,
|
|
"name": "Indiana ave. (R)",
|
|
"type": "property",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "red",
|
|
"cost": 220,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 24,
|
|
"name": "Illinois ave. (R)",
|
|
"type": "property",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "red",
|
|
"cost": 240,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 25,
|
|
"name": "B&O RR",
|
|
"type": "railroad",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "railroad",
|
|
"cost": 200
|
|
},
|
|
{
|
|
"id": 26,
|
|
"name": "Atlantic ave. (Y)",
|
|
"type": "property",
|
|
"owner": null,
|
|
"mortgaged": false,
|
|
"group": "yellow",
|
|
"cost": 260,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 27,
|
|
"name": "Ventnor ave. (Y)",
|
|
"type": "property",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "yellow",
|
|
"cost": 260,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 28,
|
|
"name": "Water Works",
|
|
"type": "utility",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "utility",
|
|
"cost": 150
|
|
},
|
|
{
|
|
"id": 29,
|
|
"name": "Marvin Gardens (Y)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "yellow",
|
|
"cost": 280,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 30,
|
|
"name": "GO TO JAIL",
|
|
"type": "gotojail"
|
|
},
|
|
{
|
|
"id": 31,
|
|
"name": "Pacific ave. (G)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "green",
|
|
"cost": 300,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 32,
|
|
"name": "N. Carolina ave. (G)",
|
|
"type": "property",
|
|
"owner": 2,
|
|
"mortgaged": false,
|
|
"group": "green",
|
|
"cost": 300,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 33,
|
|
"name": "Community Chest iii",
|
|
"type": "cc"
|
|
},
|
|
{
|
|
"id": 34,
|
|
"name": "Pennsylvania ave. (G)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "green",
|
|
"cost": 320,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 35,
|
|
"name": "Short Line RR",
|
|
"type": "railroad",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "railroad",
|
|
"cost": 200
|
|
},
|
|
{
|
|
"id": 36,
|
|
"name": "Chance iii",
|
|
"type": "chance"
|
|
},
|
|
{
|
|
"id": 37,
|
|
"name": "Park place (D)",
|
|
"type": "property",
|
|
"owner": 1,
|
|
"mortgaged": false,
|
|
"group": "darkblue",
|
|
"cost": 350,
|
|
"houses": 0
|
|
},
|
|
{
|
|
"id": 38,
|
|
"name": "Luxury Tax",
|
|
"type": "tax"
|
|
},
|
|
{
|
|
"id": 39,
|
|
"name": "Boardwalk (D)",
|
|
"type": "property",
|
|
"owner": 3,
|
|
"mortgaged": false,
|
|
"group": "darkblue",
|
|
"cost": 400,
|
|
"houses": 0
|
|
}
|
|
],
|
|
"log": [
|
|
{
|
|
"text": "roll is 6, 5",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:01:40"
|
|
},
|
|
{
|
|
"text": "Passed GO \u2014 collected $200",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:01:40"
|
|
},
|
|
{
|
|
"text": "Landed on Income Tax",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:01:41"
|
|
},
|
|
{
|
|
"text": "alice's turn \u2014 $289 on Just Visiting",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:01:47"
|
|
},
|
|
{
|
|
"text": "Trade completed between alice and bob",
|
|
"player": null
|
|
},
|
|
{
|
|
"text": "alice's turn \u2014 $484 on Just Visiting",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:01:58"
|
|
},
|
|
{
|
|
"text": "roll is 3, 2",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:01:59"
|
|
},
|
|
{
|
|
"text": "Landed on Pennsylvania RR",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:01:59"
|
|
},
|
|
{
|
|
"text": "bob's turn \u2014 $1279 on Electric Co.",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:00"
|
|
},
|
|
{
|
|
"text": "roll is 1, 5",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:02"
|
|
},
|
|
{
|
|
"text": "Landed on Tennessee ave. (O)",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:02"
|
|
},
|
|
{
|
|
"text": "Paid $14 rent to alice",
|
|
"player": "bob"
|
|
},
|
|
{
|
|
"text": "charlie's turn \u2014 $78 on Income Tax",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:02:04"
|
|
},
|
|
{
|
|
"text": "roll is 6, 5",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:02:05"
|
|
},
|
|
{
|
|
"text": "Landed on Pennsylvania RR",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:02:05"
|
|
},
|
|
{
|
|
"text": "Paid $50 rent to alice",
|
|
"player": "charlie"
|
|
},
|
|
{
|
|
"text": "alice's turn \u2014 $548 on Pennsylvania RR",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:02:07"
|
|
},
|
|
{
|
|
"text": "roll is 5, 1",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:02:08"
|
|
},
|
|
{
|
|
"text": "Landed on Kentucky ave. (R)",
|
|
"player": "alice",
|
|
"timestamp": "2026-02-21 11:02:09"
|
|
},
|
|
{
|
|
"text": "bob's turn \u2014 $1265 on Tennessee ave. (O)",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:10"
|
|
},
|
|
{
|
|
"text": "roll is 1, 1",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:11"
|
|
},
|
|
{
|
|
"text": "Landed on Free Parking",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:11"
|
|
},
|
|
{
|
|
"text": "bob's turn \u2014 $1265 on Free Parking",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:13"
|
|
},
|
|
{
|
|
"text": "roll is 1, 2",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:14"
|
|
},
|
|
{
|
|
"text": "Landed on Indiana ave. (R)",
|
|
"player": "bob",
|
|
"timestamp": "2026-02-21 11:02:14"
|
|
},
|
|
{
|
|
"text": "Paid $36 rent to alice",
|
|
"player": "bob"
|
|
},
|
|
{
|
|
"text": "charlie's turn \u2014 $28 on Pennsylvania RR",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:02:16"
|
|
},
|
|
{
|
|
"text": "roll is 5, 4",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:02:17"
|
|
},
|
|
{
|
|
"text": "Landed on Illinois ave. (R)",
|
|
"player": "charlie",
|
|
"timestamp": "2026-02-21 11:02:18"
|
|
},
|
|
{
|
|
"text": "Paid $40 rent to alice",
|
|
"player": "charlie"
|
|
}
|
|
],
|
|
"lastUpdated": "2026-02-21T11:02:22.605328+00:00"
|
|
} |