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 Code help[Subject Thread] [Add Response]
Nick Wolff wrote on Fri, Jun 2, 2017 09:11 PM UTC:

Ok, so I've been on a good venture trying to figure out how to code a Rose.  With the help of Fergus, I have learned about the logride function and after lots of experimenting on format, I discovered how to do it!  I successfully did one leg (out of 16) of the Rose's pathways, but when I tried to add a second leg, the code stops functioning as if the piece had no moves at all.  I'll copy the partial code used.

def RO logride #0 #1 (ro1 ro5 ro7 ro3 ro4 ro8 ro6) or logride #0 #1 (ro1 ro2 ro6 ro8 ro4 ro3 ro7);
def ROL merge lograys #0 (ro1 ro5 ro7 ro3 ro4 ro8 ro6 stop) lograys #0 (ro1 ro2 ro6 ro8 ro4 ro3 ro7 stop);

The ro#'s are previously defined and mapped to each individual knight moves so I can use the logride command.  I believe the problem lies in the ROL function, but I can't find any mispellings, errors in the merge command, etc.  It all worked fine until I added the second logride and logray.  Any assistance would be appreciated!

Also, any suggestions on code condensing on this point?  Am I able to create a function for each leg without having a piece on the board to name the function after?