Check out Modern Chess, our featured variant for January, 2025.


[ 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

The birth of two variants: Apothecary chess 1 & Apothecary chess 2[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, May 3, 2017 09:05 PM UTC:

Here are some functions for Aanca and Griffin movement. These use mathematical coordinates instead of logical ones, and they don't make use of any new functions. There is a bit of redundancy in them, because the same value needs to used twice, and it was easier to calculate it twice than it was to make it more compact. These will also need corresponding functions for calculating the spaces legal moves for these pieces should be checked on. These should be a bit easier to do, and I will leave it as an exercise for whoever programs these games.

def aanca-move checkride
  where #0
    * > abs - file #1 file #0 abs - rank #1 rank #0 sign - file #1 file #0
    * < abs - file #1 file #0 abs - rank #1 rank #0 sign - rank #1 rank #0
  #1 1 1
  and empty where #0 
    * > abs - file #1 file #0 abs - rank #1 rank #0 sign - file #1 file #0
    * < abs - file #1 file #0 abs - rank #1 rank #0 sign - rank #1 rank #0
  and not checkride #0 #1 1 1
  and not checkride #0 #1 1 0
  or checkleap #0 #1 1 0;

def griffin-move checkride
  where #0
    sign - file #1 file #0
    sign - rank #1 rank #0
  #1 1 0
  and empty where #0
    sign - file #1 file #0
    sign - rank #1 rank #0
  and not checkride #0 #1 1 1
  and not checkride #0 #1 1 0
  or checkleap #0 #1 1 1;