Check out Glinski's Hexagonal Chess, our featured variant for May, 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]
🕸💡📝Fergus Duniho wrote on Wed, Feb 5, 2020 02:22 AM UTC:

When using the capablanca include file, which uses the chess include file, you need to create two functions for each piece. One function has the same name as the piece label, and it tests whether a move is legal. The other function has the same name with a capital L at the end, and it returns all the spaces a piece might legally move to. You have not created this second function for your new pieces. The purpose behind this function to reduce the calculations needed to find out which spaces a piece may move to legally. Instead of testing for a legal move to every space on the board, it tests for legal moves only to spaces within the piece's range of movement. This saves time, and since things are done this way, it will not find potential legal moves for a piece unless this function has been defined.