| Author |
Message |
Patrick S. Duff (Pduff)
| | Posted on Saturday, October 14, 2000 - 2:56 pm: | |
I see in the help file that you can do "last-from?", "last-to?", "marked?" and "not-marked?". Since moves and captures aren't actually made until after move generation is complete, it's tricky to check the board position which would result from making a move during the generation of that move. Please add support for "to?" and "from?" and "captured?" position attributes for use inside a "(drops ...)" or "(moves ...)" block. [ Note: I know I can simulate these with things like "(set_position_flag to?)" and "(position_flag to?)" in the rules file, but having "to?" set automatically and then just testing it with "to?" is much cleaner! ] [ Note: I haven't fully thought out the ramifications when "add-copy", "cascade", "add-partial", "flip", "change-owner", "change-type", etc. are involved. I'll leave that as an exercise for the developers. ;-) ] |
Patrick S. Duff (Pduff)
| | Posted on Saturday, October 14, 2000 - 4:14 pm: | |
Another set of automatic flags I want are "[player-name]?" For example, suppose I have "(players Red Blue Gold Neutral)" and "(turn-order Red Blue Gold)". During Red's or Blue's or Gold's turn, they can use "friend?" and "enemy?". But during Neutral's turn, there is no easy way to tell Red's pieces from Blue's pieces from Gold's pieces. And during Red's or Blue's or Gold's turn, it's tricky to distinguish between the other two players' pieces ("neutral?" can be used to recognize Neutral's pieces). So I want "Red?" and "Blue?" and "Gold?" and "Neutral?" to work without having to define them with "set-position flag" or test them with "position-flag?". In fact, I cannot use position-flags for this purpose. Suppose during Gold's move a piece moves from one location to another location, possibly capturing a Red piece. In the move logic I update the "Gold?" and "Red?" position-flags to reflect the new position. Now it's Neutral's turn. But the "Gold?" and "Red?" position-flags have been reset! |
Fergus Duniho (Fduniho)
| | Posted on Friday, November 17, 2000 - 4:47 pm: | |
Here's a kludge for identifying which pieces belong to which player. As the first turn in the game, have some nonplayer piece assign an appropriate attribute to every piece on the board, such as (set-attribute white? true) for white pieces, (set-attribute black? true) for black pieces, etc. These attributes will then stay with the pieces for the whole game. As long as captured pieces don't change sides (as they do in Shogi) and new pieces aren't introduced during the course of the game, this should work out. Of course, I do hope they add the feature you're describing. |
|