Check out Janggi (Korean Chess), our featured variant for December, 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 Code help[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Fri, Jun 9, 2017 11:59 AM UTC:

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.