"Most Pieces of Piece Type" victory c... Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » "Most Pieces of Piece Type" victory condition « Previous Next »

Author Message
John Pritchett (John_Pritchett)
Posted on Tuesday, January 11, 2005 - 2:55 am:   

In a game I'm developing, pieces are either placed with a drop, or captured with a flip. There are special positions on the board where special pieces can be dropped, but only under particular circumstances. When no valid moves are left, the game is over and the winner is the player with the most of the special piece type. All normal positions on the board will be filled, but the special positions may or may not be fully populated.

Ideally, I would be able to create a win-condition that triggers on stalemate, and assigns victory to the player with the most special pieces on the board. Unfortunately, stalemated is a top-level goal, so it can't be associated with other piece-counting and configuration goals. Any suggestions?
L. Lynn Smith (Interrupt27)
Posted on Friday, January 14, 2005 - 8:07 am:   

Have you tried the count-condition triggered by stalemate?
L. Lynn Smith (Interrupt27)
Posted on Friday, January 14, 2005 - 8:18 am:   

Oh, I see that only 'special' pieces are considered in the victory solution.

Here's an idea.

Create a dummy position with a neutral dummy piece. Each move will test for the presence of this neutral piece. Let's call it "mother_may_I". As long as mother_may_I is located at this position, the players are able to perform moves.

Now create a move declaration which changes mother_may_I to a null. This one would also be predicated on the presence of mother_may_I on the field. And place this move declaration in a seperate move-type, let's call it "stalemate_move". The other move declarations are placed in move-type "normal". Assign move-priorities with normal as the highest.

In addition to type-changing mother_may_I to a null(or capturing it), this stalemate_move would remove any piece from the field which is not a special piece. This can be done by a simple scan of the field with the capture of all targeted pieces.

Now when the game reaches the point where there are no longer any legal moves, the next player would trigger this clean-up routine which would then result in a full stale-mate which the count-condition can now properly evalutate.

Remember that the first piece which is change-typed or captured in this final move may need to be available for the the player to actually touch.
John Pritchett (John_Pritchett)
Posted on Thursday, January 20, 2005 - 1:23 am:   

It sounds like your approach would work, so I'll file it away for a future design. I managed to devise another work-around for the problem.

Thanks!
L. Lynn Smith (Interrupt27)
Posted on Thursday, January 20, 2005 - 3:57 pm:   

You're welcomed!

I was about to suggest a form of tallying for the special pieces.

I utilized a bar graph in some of my implementations which kept track of particular events. And the win-condition was predicated on the levels of these bar graphs.

For example: In Splotch, the game is determined when a player is able to capture ten particular pieces.

But if there were no specific amount for the win-condition. There would need to be a trigger for the potential win-condition and the seperate bar-graphs need to be compared. This can be done by linking each level of one graph with its corresponding level of the other with a unique direction. Then if the trigger is a full playing field, this needs to be part of the win-condition. And a simple relative-config comparison of the unique direction, looking for a friendly token adjacent a vacant cell(or not token). Else the simple stalemate draw would be triggered.

Needless to say, there are various ways to approach this particular problem. And each will have its benefit or disadvantage. Some might even be detrimental to game play by impacting the engine's AI.

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: