|
From: Stefano B. <io...@ba...> - 2003-01-23 10:05:15
|
> The Basic idea is: When a Move is to be made we find > the Rules that applies to that move. Checks if the move > is legal, then the Move is executed. After that the Rules > get to check the new GameState to see if we should alter > it. For example enter a new Phase or declare the end > of the Game. This is a good idea: real board/vard games rules are described in a rulebook, so we can do this too. I think GameState should follow the Composite pattern and the content has to be a well structured tree of extended GameState object that will be handled by specific gamerules that the framework will provide to the game creator. What is a GameBean? Are they the object taking place in the game? Cards are GameBean? GameBeans are the objects whose state compose the GameState? I'm not sure I've understood completely your idea, could you please take a specific game and try to describe the rulebook for the specific game? I would like to see how much this method become complex in cardgames with many rules and many game states. Bye, -b- |