OK, so we have a bug in the War in the Americas code. I have a fix, but it is nagging away at me that without a perfect topological brain I may be overlooking something. So I thought why not throw it out to all YOUR brains!
Here is the puzzle. The adjudicator / judge knows about territories on the map, whether they are sea or caost or land-locked territories and what other territories each touches. So for example it knows that North Africa has a coast, touches Tunis which is also a coast, and MAO and Western Med which are seas.
If there is an army in a location, it can move to any non-sea location that it touches. Easy.
If there is a fleet in a location, it is more tricky. Take the North Africa example; North Africa touches Tunis, but can it move there? Answer, yes because it is next to it on the same coastline. But a fleet in Ankara cannot move to Smyrna even though Ankara touches Smyrna because it is not the same coastline. How do you know there is a shared coastline? Easy, look to see if both locations touch the same sea.
OK so far. So now we have the challenge. Look at this part of the War in the Americas map
As you will see, Para, Caye and Suri are all coastal regions, all touch each other and all touch the same sea. So how do you know whether you can move from one to the other or not? Obviously you can see visually that a fleet in Suri or Para could move to Caye or vice versa, but a fleet in Para could not move to Suri. But how can the dump software know that, based on only knowing about what each territory touches topologically?
My hypothesis is that if you want to move from one location to the other, you need to obviously check to see they touch and they share a sea. But you then
- check to see if there are any more locations that touch both source and destination locations and the same sea
- check to see if this location ONLY touches the other two and the shared sea
So in the example, moving from Para to Suri you would find Caye touching both and sharing the same sea, and you would find Caye only touches Para/Suri and the sea, so it must be locked in and there is no fleet route from Suri to Para.
My belief is this is a pretty rigorous test to see if there is a territory locked in between the other two on the same coastline and therefore preventing movement by a fleet. But I am not totally convinced. I keep wondering about what if a territory is on the edge of the board or something. Could it read as a false locked-in territory or something? Can anyone see scenarios where this solution would fail?