What would code logic be for isolated... Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » What would code logic be for isolated pieces not moving? « Previous Next »

Author Message
Richard Hutnik (Richardhutnik)
Posted on Tuesday, January 14, 2003 - 11:42 am:   

I am curious what the code would look like to tell Zillions that a piece that isn't next to any other piece orthgonally, can't move.
Matthew Burke (Morat)
Posted on Tuesday, January 14, 2003 - 1:19 pm:   

Roughly:


(define not-lonely?
(or (not-empty? n)
(not-empty? s)
(not-empty? e)
(not-empty? w))

...

( (verify (not-lonely?)) ...rest of move code...)


This is off the top of my head, so it's not tested---plus I'm sure I have too many/too few parenthesis....
Richard Hutnik (Richardhutnik)
Posted on Tuesday, January 14, 2003 - 10:31 pm:   

Thanks for the help. I think I may get around to proceding to do my Dvonn/Focus hybrid. I think I may call it Foconn. Or Dvocus.

- Richard Hutnik :-)

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: