Magnetic Chess and Variants

Here are some Zillions files of four Chess variants created by Joao Pedro Neto. Each is based on the idea of pieces attracting and/or repelling each other. In Magnetic Chess, pieces of the same color repel, and enemy pieces attract. In Anti-Magenetic Chess, like attracts like, and enemies repel each other. In Gravity Chess, pieces attract each other. In Anti-Gravity Chess, pieces repel each other. To learn more about these Chess variants, read Chess and Physics.

These files are based on a ZRF file Joao Neto made for Magnetic and Anti-Magnetic Chess. Some things were left undone in this file, and Fergus Duniho (that's me) finished the code for Magnetic Chess and then based separate files for Anti-Magnetic Chess, Gravity Chess, and Anti-Gravity Chess on that code.

As far as I know, there are no bugs in the code for Magnetic Chess, Anti-Magnetic Chess, and Gravity Chess, but there are some bugs in the code for Anti-Gravity Chess. In this game, it is possible to repel Pawns of either color to their promotion zone, and it is sometimes possible to repel a Pawn of each color to its promotion zone, resulting in the promotion of two pieces at the same time. On the rare occasion when this happens, you are given a choice only for what piece your Pawn will promote to. The enemy Pawn automatically promotes to a Knight. I chose to let it promote to a Knight, because when you do promote your opponent's piece, you would more often than not choose to promote it to the weakest piece in the game, which is a Knight. For most games, I expect this double promotion bug won't come up. When you promote only one Pawn, whether your Pawn or the enemy Pawn, it works fine, letting you choose which piece it will promote to.

The other bug regards an extra rule in Anti-Gravity Chess, which could not be implemented. It's called the Ko rule, and it makes it illegal to repeat any previous board position. I replaced this with the next best thing Zillions can do. When the same position is repeated three times in Anti-Gravity Chess, the player who makes the repeating move loses. I could do this, because Zillions normally checks for three-times repetition. Unfortunately, it will not check for one-time repetition.

Since one of the variants is called Magnetic Chess, I thought it was suitable to use a Magnetic Chess set design for the Chess pieces. So I added pieces I made out of Armando Marroquin's Chess Magnetic font. I also added a new chess board with some coordinate markers around it.

Finally, I've added a clarification to the rules for each of the four games. Since there is no notion of check in any of these games, I assume that a King may castle from check, through check, and into check. This is how I've implemented castling for each of the games.

Changes

30 November 1999

Jeff Mallet pointed out some bugs to me, and I fixed them. Some of the games were trying to move pieces from empty squares. This is fixed. Also, I had implemented Queen-side castling incorrectly. This is now fixed.

I've also changed the directory structure slightly, as I am now using a unified directory structure for all my ZRF files, which will allow them to all go into the same directory and share image files.

Fergus Duniho