Check out Grant Acedrex, our featured variant for April, 2024.


[ 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

Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
Aurelian Florea wrote on Mon, Feb 10, 2020 09:35 AM UTC:

@Greg & @Fergus

For now I could not do a fast castle routine by trying the replace the regular routine. I think it is better to start from scratch as this type of castling is less restrictive anyway. I'll try again later.

For reference fast castling involves leaping the king at least 2 spaces towards the rook (regardless of any hindrance) and the rook in the initial king place.

A pseudocode would involve the following steps:

1. Check for the flags (here I have some trouble as I have to work with regular code)

2. Check if the king is in check (copy paste from regular routine) 

3. Check if the space if free and 2 squares far 

4. Move the king

5. Move the rook

For now I have a few slips but maybe I can do it!...