Thursday, October 25, 2007

Threes - Beta

Lets continue my Threes Development Diary. I have already covered the pre-alpha and alpha stages in previous posts, so lets look at how I reached the beta stage.

19:15 The only thing left in the game to complete before the game is actually complete to the desired specs is to finish the AI. This should be interesting. I am thinking that a two pass AI would be best. First pass for each roll the lowest die is kept. The second pass then keeps any one or threes. The key question is where do I put the AI? Having the AI in the player does make sense, but will require that I add some extra functionality to the game class. That being said, the game class could handle the algorithm very simply as it has all the information needed. This would result in more efficient AI at the possible cost of making it much more difficult to swap out AI for future versions of this game. As I am not likely to make future versions of the game, the person who does can always move the AI out of the game class into it's own class when there is time. My time limit is rapidly approaching so I am going to go with the fastest approach. This is putting the AI inside the game class. Of course, while testing the AI, a bug was discovered with the red player. It seems that when red won or tied, they never got notification or points. It turned out to be a simple case of starting the loop with 1 instead of 0 and the reason I used 1 instead of 0 was because the above loop used the red player as the first score to beat value so that loop had to start with 1. At this point, I have all the stuff that I wanted in the game so we can officially consider the game a beta. Beta Build 1 has now been compiled.

No comments: