Sunday, September 24, 2006

Declarations Tab

As you can see, the declarations tab on the Kingdoms View Window is starting to take shape. I'm not 100% happy with the code populating the pane, but the functionality is complete.

Adding the declaration order required a lot more effort than I initially expected. There are several (undocumented) features that Orders have to properly implement to work correctly, and I stumbled upon most of them through trial and error. I now have a TestCase documenting the required steps, so work on future orders (such as trading with a partner) will be easier.

I also added close to 40 more tests to get a handle on how each game archives players. There was one critical aspect I didn't realise until it was too late - players cannot be referenced until they are loaded. The initial plan was to persist ally & enemy declarations using the target player. Unfortunately, if the ally was not already loaded, the game coughed. I decided to lazy load the allies & enemies - internally I store the kingdom code, and then find the players at the last second as the game requires them. It's a little more complicated, but I'm happy with the results. I'm also happy I had junit tests in place for the archiving - I changed the implementation, and the tests stayed green. This gave me confidence that everything still worked.

Finished Validation

I finally had a chance to finish error handling and order validation for declarations while the boys were napping this afternoon. I'm also happy to report that I now have over 100 automated unit tests in place for the game. This is excellent progress.

Slow Week

It's been a slow week (and weekend) for team game development. I just finished basic order entry, but need to finish the error handling. Hopefully more later today.

Sunday, September 17, 2006

Declarations Dialog

The first draft of the Declarations Dialog for the Fall of Rome team game. has been finished. Click on the new Declarations button in the Kingdom View Window and you will see:



You'll notice that the drop-down list (a JComboBox in Java parlance) has a white background instead of the standard texture used in the other dialog boxes. I believe that the white background makes the kingdom banners stand out more. Does anyone have a preference?

Friday, September 15, 2006

The Kingdom View Window


The team game adds a new tab to the Fall of Rome Kingdom View Window called "Declarations". This tab will display every ally and enemy declaration made in that game so far. I'm having trouble choosing a colour for the tab. Any suggestions?

Tuesday, September 12, 2006

Team Game is Underway

It's been some time since I've posted an After Action Report, so I thought I'd start publishing some development updates.

I am currently working on adding teamplay capabilities to Fall of Rome. This variant will enable players to choose up to two allies and declare an unlimited number of enemies over the course of a game. Kingdoms can trade resources and intelligence with their allies, and declared enemies suffer political and military penalties when attacking.

I have just finished updating the rules header and game archives to support the team game option. This was a big step, and I now have a much better grasp of how the Fall of Rome Archive system works. It's quite simple, but it took a couple attempts before I got it right.

The hardest part of development so far has been adding unit tests. It took 25 tests just to ensure the basic rules header was being loaded correctly. Much of the code was written without testability in mind, so it adds to the challenge. I'm sure many of the posts to come will deal with bringing the game under test.