[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Whenever you write a function or a subroutine with the same name as a previous one, it replaces it. So, you could include chess3, then after including it, write new k, K, and stalemated subroutines that do not include castling. But with regard to castling, things are even simpler than this. Since chess3 relies on the variables wcastle and bcastle to know which spaces a King may castle to, just set them to empty arrays, and castling is disabled. Do this after including chess3, so that these new values overwrite the ones set in chess3.