Skip to content

Commit df6de45

Browse files
committed
Extended validation and click handling added to Chase. That's all of them! Ambiguous moves (which are thankfully rare) still have to be manually entered. Finding a simple resolution is on the TODO list.
1 parent 6abf73a commit df6de45

File tree

6 files changed

+518
-35
lines changed

6 files changed

+518
-35
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
#### New Features
2222

2323
- Added `renderColumn(col: number, row: number): APRenderRep` function to all `stacking-expanding` games. This will return a separate JSON render for *just* the expanded stack.
24-
- Click handling, including extensive validation and localized error messages, has been added to all games except for the following:
25-
- Chase
24+
- Click handling, including extensive validation and localized error messages, has been added to all games!
2625

2726
## [0.4.0] - 2021-11-15
2827

TODO

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
✔ Should there be a "results" variable to report in localized language what changed in the game state? @done(21-11-07 08:52)
2-
- The AI appears to be broken at even plies, and does not always do what is expected. Need to evaluate whether this is the fault of the library, the game code, or some combination of both.
2+
✘ The AI appears to be broken at even plies, and does not always do what is expected. Need to evaluate whether this is the fault of the library, the game code, or some combination of both. @cancelled(21-12-10 07:50)
3+
✔ Make game descriptions translatable. We could remove the embedded heading and just leave the styling to the front end. Just have the blurb, all on one line or with encoded newlines, and only basic Markdown? @done(21-12-10 07:51)
4+
✔ Apparently rotating the board disables the click handlers. Figure that out. @done(21-12-10 07:50)
35
- It's also possible to have the API server generate the reports and just request specific pieces of information from game code. Because I'm the one working on the game and RecRanks code and not the API server, I put the code here. Reconsider in the future.
4-
- Make game descriptions translatable. We could remove the embedded heading and just leave the styling to the front end. Just have the blurb, all on one line or with encoded newlines, and only basic Markdown?
56

67
- Blam!: Implement variant "Overloaded"
78
- Entropy: Player-specific rendering
@@ -10,4 +11,4 @@
1011
- List of SDG games still to migrate: acity, archimedes, complica, fanorona, focus, frames, garden, mirador, phutball, qy, realm, reaper, scribe, soccer, strings, wyke. This is based on looking at games in the top quartile of "most played of all time," games played recently, and game ratings by players. Grand total is 34 games (18 already coded, 16 in the queue). Nothing is guaranteed. A nomination process will be instituted at some point.
1112

1213
- Fix Amazons partial rendering (annotations missing). While I'm at it, triple check there are no other games using this old way of annotating.
13-
- Apparently rotating the board disables the click handlers. Figure that out.
14+
- Click handling: Find a simple way to resolve ambiguous moves in Chase. Thankfully they are rare.

locales/en/apgames.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,19 @@
163163
"PARTIAL_PRECAP": "Select a piece to capture.",
164164
"TOOHIGH": "The pieces you capture cannot total more than six."
165165
},
166+
"chase": {
167+
"BALANCE_LOWEST": "When balancing you must select one of the pieces with the lowest speed. The piece at {{where}} is not one of those.",
168+
"DISTANT_EXCHANGE": "The cells {{left}} and {{right}} are not adjacent to each other.",
169+
"INITIAL_INSTRUCTIONS_balanced": "Select a piece to move. Select a piece twice to begin an exchange.",
170+
"INITIAL_INSTRUCTIONS_imbalanced": "You are imbalanced by {{delta}} speed. Select on of your pieces with the lowest speed to correct.",
171+
"MULTIPLE_PATHS": "There is more than one way to get to {{to}} from {{from}}. Please edit the move box to add a compass direction or choose the exact move from the drop-down menu.",
172+
"NOCHANGE_EXCHANGE": "Exchanges must result in a change in the board state.",
173+
"NOPATH": "There is no path from {{from}} to {{to}}.",
174+
"PARTIAL_BALANCE": "You are still imbalanced by {{delta}} speed. Select another of your pieces with the lowest speed to correct.",
175+
"PARTIAL_EXCHANGE": "Select another adjacent piece to make the exchange.",
176+
"PARTIAL_MOVE": "Select a destination, or select the same piece again to begin an exchange.",
177+
"UNEQUAL_EXCHANGE": "Exchanges must result in the same combined speed. The original combined speed was {{original}}. Your requested move would change that to {{proposed}}."
178+
},
166179
"entropy": {
167180
"INITIAL_INSTRUCTIONS_chaos": "Select an empty cell on your opponent's board to place the next piece.",
168181
"INITIAL_INSTRUCTIONS_order": "Select a piece on your board to move, or pass.",

locales/fr/apgames.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@
164164
"PARTIAL_PRECAP": "[FR]Select a piece to capture.",
165165
"TOOHIGH": "[FR]The pieces you capture cannot total more than six."
166166
},
167+
"chase": {
168+
"BALANCE_LOWEST": "",
169+
"DISTANT_EXCHANGE": "",
170+
"INITIAL_INSTRUCTIONS_balanced": "",
171+
"INITIAL_INSTRUCTIONS_imbalanced": "",
172+
"MULTIPLE_PATHS": "",
173+
"NOCHANGE_EXCHANGE": "",
174+
"NOPATH": "",
175+
"PARTIAL_BALANCE": "",
176+
"PARTIAL_EXCHANGE": "",
177+
"PARTIAL_MOVE": "",
178+
"UNEQUAL_EXCHANGE": ""
179+
},
167180
"entropy": {
168181
"INITIAL_INSTRUCTIONS_chaos": "",
169182
"INITIAL_INSTRUCTIONS_order": "",

0 commit comments

Comments
 (0)