chrisboyle / sgtpuzzles

Android port of Simon Tatham's Puzzles
https://chris.boyle.name/puzzles
Other
584 stars 166 forks source link

Tents: say 1-to-1 more explicitly in docs #595

Open Fabian42 opened 1 year ago

Fabian42 commented 1 year ago

Screenshot_20230324-025006_Puzzles Maybe I missed something, but from how I understand it, the top left tents should not conflict. Game ID: 8x8:ajacbaklab_ag,2,1,1,1,3,1,2,1,3,0,1,2,1,2,1,2

chrisboyle commented 1 year ago

The rule in the manual is "The tents and trees can be matched up in such a way that each tent is directly adjacent (horizontally or vertically, but not diagonally) to its own tree. However, a tent may be adjacent to other trees as well as its own."

The phrasing "each tent is [...] adjacent [...] to its own tree" means two tents can't share a tree; they have to be matched up 1-to-1. This could maybe be called out more explicitly in the manual.

Fabian42 commented 1 year ago

If each tent has to be adjacent to a tree and both types have the same amount, then 4x4:bgd_,0,1,0,2,2,0,1,0 should be solvable:

Screenshot_20230324-123630_Puzzles

And the game does allow a tent above and one below the left tree in the second row of the first screenshot.

chrisboyle commented 1 year ago

Puzzles should not generate the 4x4 game ID you have given (if it did, that's a bug), and if you launch that game ID and press Show Solution, it tells you that it's not self-consistent. This is because of the 1-to-1 aspect of the rule.

The reason two tents above and below the tree you mention in the first screenshot are allowed is because the lower one is also adjacent to a different tree so it doesn't mean that they are necessarily trying to share the mentioned tree.

Hope that helps

Fabian42 commented 1 year ago

So it's not about the total number, but about there being a theoretical pairing of each tree to its own tent and each tent to its own tree, which are always adjacent? If I have tree – tent – tree – tent – tree, then another tent can and has to be at one of the ends, but not on the middle tree?

chrisboyle commented 1 year ago

Exactly, yes