Check out Balbo's Chess, our featured variant for October, 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

how do you program a non-capture move[Subject Thread] [Add Response]
wdtr2 wrote on Sat, Jul 20 09:48 AM UTC:
This message is mostly for @fergus The elephant to me is a diagonal mover. It may leap 1 or two squares. I want to make a variant of the elephant that has the ability to change its diagonal color (checkered board). The changing of color is a special move. This special move is 1 leap backward in the South direction only and it can only be done as a non-capture move. I attempted to program this move, but I can't figure out how to do it. I am hoping someone can help me out. This is my elephant move right now:

def White_Elephant checkleap #0 #1 2 2 or checkleap #0 #1 1 1 ; def White_Elephant-Range mergeall leaps #0 2 2 leaps #0 1 1 leap #0 0 1;

set White_Elephant-Desc "The %s may leap two spaces in any diagonal direction, or go backwards 1 space if the space is empty.";

def Black_Elephant checkleap #0 #1 2 2 or checkleap #0 #1 1 1; def Black_Elephant-Range merge leaps #0 2 2 leaps #0 1 1; set Black_Elephant-Desc "The Elephant may leap two spaces in any diagonal direction, and may move one space backward if the square is empty.";

*** What do I need to do to make a non-capture move that is 1 square south?