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

Programming Piece Movement in Game Courier. A tutorial on two different ways to program piece movement in Game Courier.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, Nov 9, 2023 09:31 PM UTC in reply to A. M. DeWitt from 03:15 AM:

The difference was that logride was using a recursive function, and lograys was not. So, I wrote a recursive function for lograys, and I tested it with a Queen that could move anywhere but its own square. Tests showed that it worked correctly for straight riders, turning riders, and winding riders. So, lograys and logride will now match up.

The innermost direction or series of directions is the one that gets repeated, because it repeats any series of directions given to it within parentheses, and it just gets caught in each deeper loop without any means of returning to the outer loop. But since it stops when it runs out of spaces, it avoids an infinite loop.