Check out Grant Acedrex, our featured variant for April, 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

ZRF question[Subject Thread] [Add Response]
Antoine Fourrière wrote on Sun, Jan 19, 2003 09:38 PM UTC:
Here is a piece of code which works for another pair of drops (plus a third
one on a phony square). The macro drops a pair of halfling long-leapers on
b1 and g1, or b8 and g8, by clicking on g1 or g8, after veryfing that
shooters, coordinators, advancers or withdrawers haven't been dropped by
either player(only one pair of halflings will be dropped -- the same type
for each player, but the first player chooses where -- and which kind --
to drop), and that the two squares to receive the halfling long leapers
are empty . (It also drops a third one on DroppedLongLeapers, to prevent
the drop of shooters, coordinators, advancers or withdrawers.)

(define drop-halfling-long-leapers-on-g (
	(verify (and (neutral? WhiteKingMoved) (neutral? BlackKingMoved)))
	(verify (empty? DroppedShooters))
	(verify (empty? DroppedCoordinators))
	(verify (empty? DroppedAdvancers))
	(verify (empty? DroppedWithdrawers))
	(if (am-white) b1 else b8)
	(verify empty?)
	(if (am-white) g1 else g8)
	(verify empty?)
	cascade
	(if (am-white) b1 else b8)
	cascade
	DroppedLongLeapers
	add
))

The procedure is called in the drops part of the piece. So something like

(if (am-white) 'this square' else 'that square'
(verify empty?)
cascade
(if am-white) 'that square' else 'this square'
(verify empty?)
change-owner
add


should work, at least if the rotational or reflectional squares are known
-and empty?