Check out Makruk (Thai Chess), our featured variant for March, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Swapper Superheroes Chess. (Updated!) Normal chess with the addition of one or more 'swapper' pieces. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
💡📝Martin Nilsson wrote on Fri, Jun 21, 2024 04:38 PM UTC in reply to Fergus Duniho from 01:26 PM:

Thanks! I think I fixed it now.

Edit: Actually I didn't. I think the problem is that a mouse move can be interpreted both ways (origin-dest or dest-origin) in the mouse interface, because of how pawn moves can be entered. So it thinks a swapper piece moving onto a friendly pawn, and the pawn reappearing swapped, was a pawn move the other way around. But somehow my code for the swap gets correctly run, but there seems to be some kind of post-autocorrect on the written move that even overwrites my 'rewritemove' code.

Edit 2: Actually it's better now with the 'rewritemove' code running. Sometimes the notation turns out correct. And anyway, maybe the two things are equivalent, so the game record isn't really corrupted, you could say.

Edit 3: It works with moves where the dest coord is more up-right than the origin coord. Probably because of some internal ordering of the mouse entered coords or something.

Edit 4: So in the mouse interface, origin-dest and dest-origin are really the same thing. And perhaps the Post-Move code even gets run twice to determine this (which it was)? And you're supposed to use the 'swap' command when you want a swap effect. But in my game, there might be some situations where origin-dest and dest-origin doesn't mean quite the same thing. So is there a way to turn off the dest-origin way of entering mouse moves?

Edit 5: I found a way around it in my code. And I don't think there are any ambiguous situations in my game where origin-dest and dest-origin mean different things (friendly swaps give the same result independent of direction). So I'm happy now. :)