Compare commits

...

2 Commits

Author SHA1 Message Date
Bram van den Heuvel 5453a8acc3 Fix representation bug 2026-07-05 08:37:30 +02:00
Bram van den Heuvel 76875b61bb Include `roll` in Ur game payload 2026-07-05 08:27:09 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ class RoyalGameOfUr(Game):
d : dict[str, Any] = dict(
enemies_at_start=self.board[0][ot_index],
enemies_at_finish=self.board[BOARD_LENGTH-1][ot_index],
roll=self.roll,
safe_fields=list(SAFE_FIELDS),
stack_fields=list(STACK_FIELDS),
star_fields=list(STAR_FIELDS),
@ -105,7 +106,7 @@ class RoyalGameOfUr(Game):
for i in range(BOARD_LENGTH):
d[str(i)] = (
"YOU" if self.board[i][my_index] > 0 else (
"ENEMY" if my_index not in SAFE_FIELDS and self.board[i][ot_index] > 0 else (
"ENEMY" if i not in SAFE_FIELDS and self.board[i][ot_index] > 0 else (
""
)))