Command "piece-equal?" wanted Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Desired Features for Zillions of Games » Command "piece-equal?" wanted « Previous Next »

Author Message
Karl Scherer (Karl)
Posted on Thursday, November 16, 2000 - 1:46 pm:   

Zillions is the only computer language I know that does not allow to test for equality.

In many games I would like to know whether
the piece-type on one position is equal to the piece-type on another position:

(verify (piece-equal? a7 c4))

or, if I am currently on a7, just

(verify (piece-equal? c4))

I have to code for every single piece-type
separately:
(if (piece? type1 a7) (verify (piece? type1 c4))
(if (piece? type2 a7) (verify (piece? type2 c4))
(if (piece? type3 a7) (verify (piece? type3 c4))
....

I have to do this for EVERY pair of places that I want to check.

Especially in games with many piece-types it
would be a big advantage to have the equal-test.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: