Repository navigation
Conversation
When a route crosses a border many players don't know about (Spain and Morocco via Ceuta and Melilla, Turkey and Azerbaijan via Nakhchivan, the Wakhan Corridor, and so on), add a short note to the route between the arrow and the country just reached. If a player makes two wrong guesses and every way forward crosses one of those borders, show a hint naming the country they're in without giving the answer away. Guessing Mauritania from Morocco (or the reverse) explains that the puzzle has no border there because of Western Sahara. The borders and notes live in res/values/tricky_borders.xml so the map review screen can reuse them later. Addresses #9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwXCdeWh35FYFQjdYfUWdv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #9.
Why
Spain–Morocco (via Ceuta and Melilla) is on a shortest path in 890 of the 6,283 puzzles. Players who don't know about it get stuck, or wonder why the answer is right. Several other borders cause the same problem. Counting from
graph_paths_subset.csv, at least one shortest path crosses one of the borders below in 2,461 puzzles.What players see
Borders included
Left out on purpose:
Code
res/values/tricky_borders.xml: the border list (Country A|Country B|Note), the missing-border list and the hint string. Adding a border only means adding a line here. The map review screen (Add an offline map screen: study, review, hint and answer modes #10) can reuse the list later.TrickyBorders.java: loads the lists and looks up a pair in either order.SolvePuzzle.java: tracks the current country and wrong guesses for the current step, adds the crossing notes (including the final crossing into the destination), and shows hints.activity_solve_puzzle.xml: a hiddenborder_hinttext line above the input.Testing
tricky_borders.xmlmatches thecountriesarray, and produced the counts above.SolvePuzzle.javaandTrickyBorders.javacompile withjavacagainst the Android 14 framework jar (Robolectricandroid-all), with stub AppCompat andRclasses. The Android SDK isn't available in the environment where this was written, so this PR's CI run is the first full Gradle build.TrickyBorderswas run on the JVM against the real XML entries: lookups work in either order, apostrophes like "People's Republic of China" are handled, and the missing-border note appears only for the right pair.Notes
SolvePuzzle.java(imports only), so a rebase should be easy.Generated by Claude Code