I'm currently working on a Score Four game. I have all the graphics done, the moving of the balls from the pool of balls to the poles on the game board. Every thing works great. But now I am faced with how to keep score.
The game consists of a board with 16 vertical poles arranged in a 4 x 4 pattern. Each pole can contain 4 balls of either all white, all black, or a combination of white and black balls.
One player has white balls and the other player has black balls. Each player has a total of 32 balls to begin with. The object of the game is for any player to get the highest score. The game is played by each player taking turns dropping one of his balls on a pole until all balls have been dropped trying to get 4 balls in a row. If he can do this he will get a score of 4. It is possible that any player can get multiple scores of 4 if his balls are arranged in all 4 balls in a straight line or all 4 balls in a diagonal line in any direction. See attached picture that shows one of many possibilities of scoring. In this example you can see that player can score on the following combinations (numbers represent the ball numbers in their respective positions on the poles):
Let's say this player has a ball every where you see a red ball except for the red ball that has a 0 in it. There is no possible score for this arrangement. But if he can drop a ball on the first pole ball 0 he will immediately get a score of 24 (4 points for each line).
My problem now is how do I keep track of these balls so I can give each player his correct score every time he drops a ball on any pole
The game consists of a board with 16 vertical poles arranged in a 4 x 4 pattern. Each pole can contain 4 balls of either all white, all black, or a combination of white and black balls.
One player has white balls and the other player has black balls. Each player has a total of 32 balls to begin with. The object of the game is for any player to get the highest score. The game is played by each player taking turns dropping one of his balls on a pole until all balls have been dropped trying to get 4 balls in a row. If he can do this he will get a score of 4. It is possible that any player can get multiple scores of 4 if his balls are arranged in all 4 balls in a straight line or all 4 balls in a diagonal line in any direction. See attached picture that shows one of many possibilities of scoring. In this example you can see that player can score on the following combinations (numbers represent the ball numbers in their respective positions on the poles):
Code:
0-1-2-3 0-4-8-12 0-5-10-15 0-17-34-51 0-20-40-60 0-21-42-63
My problem now is how do I keep track of these balls so I can give each player his correct score every time he drops a ball on any pole