Droping Pieces Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Droping Pieces « Previous Next »

Author Message
Michael Asher (Mike)
Posted on Sunday, March 13, 2005 - 2:33 pm:   

Hi

Can anybody tell me how to program a drop move from posistions within a board rather than a drop from off the board.

Many Thanks
Sean Duggan (Dream)
Posted on Monday, March 14, 2005 - 12:26 am:   

I'm not entirely sure what you mean, but I think that the Zillions implementation of Shogi (using a section of the board to hold captured pieces, which can then be "dropped") does what you're trying to do.
L. Lynn Smith (Interrupt27)
Posted on Wednesday, March 16, 2005 - 12:26 am:   

Technically, it would not be a drop but a simple move. More like a leap.

Define the area where this move will originate as a zone. Make sure to verify this zone at the start of the move.

If the number of potential destination cells are small, you can simply step to each one with seperate move declarations.

If there are a larger number of potential destination cells, creat a specific direction, for instance called 'scan', and link all these cells. After verify-ing the proper starting zone, have the piece leap to the start of this 'scan' and step it through the direction. Testing and adding each cell accordingly.
Michael Asher (Mike)
Posted on Wednesday, March 16, 2005 - 3:33 pm:   

Thanks for the feedback, you are right this is a move not a drop. but can you help me how do I define the direction scan, when I try to do this I run into parse errors.
L. Lynn Smith (Interrupt27)
Posted on Friday, March 18, 2005 - 4:20 pm:   

You need to define the links statement within the board declaration. For example:

(board
...
(links scan (a1 a2)(a2 a3)(a3 a4) ...)
...
)

Stepping through each of the cells which the piece will possibly move.

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: