Today was just a shambles! I spent the bulk of it trying to Microsoft SQL's JDBC driver authenticating to our local SQL server using domain authentication instead of local server authentication. What makes it hard is that it has to work off Linux, so I've had to deal with the Java Kerberos implementation and it's oh so helpful error messages (here's an amusing / terrifying list).
Then I nearly got caught in a hail storm on the way home and to top it off 15 minutes after I reached home the storm hit and lightning took out the power in our area, so I basically slept until 21:00 when the power came on again instead of doing any of the work I needed to get done before tomorrow night.
The only upside to today is that I was able to quickly implement player elimination in less than an hour! It would've been even less had not been sidetracked into researching roguelike inventory systems by a colleague's request for code review - that was a lot of fun though and may actually be useful if I get as far as needing an inventory system in my game.
Player elimination is working! It's built with the strategy pattern, with the only strategy currently implemented being if the player loses all their city sectors, so it's still pretty basic. However I can think of a few more strategies that I may want to add in the near future (along with strategy that composes multiple strategies):
- Elimination due to losing your HQ (starting sector).
- Elimination due to bankruptcy.
- Elimination due to being hacked into becoming another player's pawn.
The next steps to finish this are:
- Add a message system to the domain and UI.
- Add domain logic for winning (strategy pattern again).
- Add a message for telling you you've won.