Adjacent-to-friend? Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Adjacent-to-friend? « Previous Next »

Author Message
Y Dienyddiwr Da (Dienyddiwr)
Posted on Saturday, July 13, 2002 - 4:27 am:   

What's the best way to simulate an "adjacent-to-friend?" check?
Karl Scherer (Karl)
Posted on Monday, July 15, 2002 - 9:19 am:   

The word adjacent depends on the topology
(connections of positions) you work with.

On a square grid with direction n,s,e,w
a position is checked for adjacent-to-friend by
checking the pieces to the north, south, east and west:

(if (or
(friend? n)(friend? s)(friend? e)(friend? w)
)
...
)

Cheers, Karl

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: