| Author |
Message |
Dr R. T. Mukherjee (Rick)
| | Posted on Wednesday, March 10, 2004 - 10:17 am: | |
Dear All, I have recently started programming another chess variant (!) called Judtho (the Bengali word for war). It is on a 12 x 12 board, for 2, 3 or 4 players and has a few potential versions but the most interesting is probably the elimination version. Programming it in Zillions will be the problem: Four players: White & Yellow (partners) and Black & Blue (also partners). Questions: 1. Players drop pieces into their zone at the beginning of the game but they must choose between either a Princess piece or a Prince. Would the OR command work for this and if so how? 2. Players are not allowed to drop their pieces so that they give check to their partner's King, nor are they allowed to give check to their partner or capture any of their pieces during the game. How can these rules be programmed? 3. Checkmate in Judtho occurs if a player gives check to another player and that player cannot or could not relieve check in one move i.e. it is instantaneous & occurs even if it is not the checkmated player's move. It has several immediate effects: a) All the checkmated pieces, including the King and wherever they are on the board, should change colour and become the mating player's pieces. b) If the mated side has any pawns, then the mating side must promote one to either a Prince or a Princess depending on which one the mated side did not choose (e.g. if the mated side originally chose a Princess, then the mating side promotes a pawn to a Prince and vice versa). c) The mated player is eliminated from the game and play simply passes between the three remaining players in the same order as it began. d) If one of the other two players checkmates either of the first players Kings then he or she is eliminated and the new mating side gains all that player's pieces along with the two Kings (and so will have three Kings). He or she loses if any one of these three Kings is mated. All this should happen before another move is played. How can this be programmed in Zillions? 4. A Knight can either check or give immediate checkmate (with the same consequences as above) in Judtho; how can these powers be programmed? I hope I haven't asked too much and I would be really overjoyed if someone could help with these problems. With many thanks and kind regards, Rick. |
Jeff Mallett (Jeffm)
| | Posted on Wednesday, March 10, 2004 - 7:17 pm: | |
>1. Players drop pieces into their zone at the >beginning of the game but they must choose >between either a Princess piece or a Prince. >Would the OR command work for this and if so how? I'll answer this, since it's the easy question! The way to do this is to define drops for the Princess piece and drops for the Prince piece. When a user tries to drop something, Zillions is smart enough to know that it could be either a Prince or Princess and will ask automatically. For sample code, look at the TicTacToe variant "Order and Chaos" (Rules/TicTacToe.zrf). Regarding your other questions, it looks like your games definition of checkmate is different from Zillions'. For example, Zillions always ends the game at checkmate, whereas in (C) your game continues. (Most puzzles/games involve 1-2 players, so Zillions doesn't support a lot of things that are specific to 3+ players.) Therefore you will have to not use check/checkmate in the Zillions sense, but create your own. For example, you can define your piece movement such that no piece can move if the player is checkmated, by your definition. Doing this kind of stuff is very difficult and time-consuming, because you have code it all yourself. |
Dr R. T. Mukherjee (Rick)
| | Posted on Thursday, March 11, 2004 - 9:47 am: | |
Thanks Jeff, Thanks so much for the very fast reply. I'll try a few things and let you know how I get on - I'm thinking that something like set-flag or piece attributes might be helpful but I was wondering whether Zillions can include checkmate as part of an IF command e.g. IF checkmated THEN set flag to true in which case maybe all the other pieces could respond by changing colour and it could offer the player a pawn to promote. The Knight could also have the power to change the flag if it was in the relative position of the King. If the checkmate command cannot be included in IF, is there an easy way of defining checkmate to Zillions - after all, checkmate must already be defined for Zillions - just internally. I'll see if I can think of some code for dropping pieces so that they do not check or are checked by partner's Kings but I'm not sure how to define another player as a partner. Thanks again and I'm sure I'll be getting back to you (and anyone else) as soon as I can. Rick. |
Jeff Mallett (Jeffm)
| | Posted on Thursday, March 11, 2004 - 11:43 am: | |
"if checkmated" would be a bit paradoxical. "if" can only be used in defining piece movement, and checkmate is defined based on piece movement. So, you'd be defining how pieces move based on how pieces move. Well, "attacked?" is also paradoxical and we worked around that, so we could find ways to work around this also. But this is not the first time I've seen the take-over-the-side's-piece rule in 4-player games, so I think the best answer would be if Zillions started supporting some 4-person concepts like this. |
|