Weekly Report 5
This week was a big week for me and Risk. At the close of last week I had a ruleset that just barely displayed in a client, and had a few moves that did nothing. Today, one week later, I have a fully playable ruleset with unit movement and reinforcement move “fully” implemented in their basic state and player messaging for all currently implemented features. Obviously I’m coming out of this week feeling really good about the way things are going. Its about 3 weeks before midterm evaluations, I have a basic ruleset, a few options, and time to work out bugs/increase polish. It doesn’t so much excite me that I am where I am, as Risk is pretty simple; I’m more excited that I didn’t get stuck somewhere along the way to creating a ruleset and fail. I’ve gotten past what I think is the hardest, and most uncertain part, and now I have a solid(?) base to build on.
Informatively speaking, I managed to work full time this week again. Having done so 5 weeks in a row I think I will be able to manage to continue as such for the remainder of the summer; From now on I’ll probably only report if I didn’t work full time for some reason.
Monday:
- Implemented a getAdjacent method for planets that returns a list of neighbour planets in the graph. commit.
- Implemented the RiskTurn::calculateReinforcements() function. The function rewards players reinforcements based on a few user set game-options. commit.
- Implemented a check for a fully claimed board in risk.cpp. This function is used to determine if spaces are availible on the board. commit.
- Fixed the onAddPlayer function in Risk to properly filter out players if the board is full or options restrict players joining. commit.
- I started added more logger calls for quick debugging of logic errors.
- Added miscellaneous checks and messaging throughout the ruleset.
Tuesday:
- Properly populated the Move order’s list of adjacent planets. commit.
- Implemented the Move order. Players can now move armies onto adjacent friendly and unowned territories. commit.
- Implemented the Reinforce order. commit.
- Started working on messaging in Move::doTurn. It was particularly challenging to do so until I found out about boost::format for making messages with uint32_ts.
Wednesday:
- Implemented attack moves and restrictions on the number of units being moved based on a planets current state. Also implemented various fixes and modifications on how Move orders work. commit.
- Implemented a dice roll system that takes attacker and defender odds, roll dice for the players, and returns a pair indicating how many units each player will lose based on that roll. commit.
Thursday:
- Added a system for sending messages to all players involved in a Move order. This includes the attacker/originating planet owner and defending players. In the case of attack moves defending players are informed about the attack, whom is attacking, and the results. commit.
Friday:
- Implemented odds restrictions. This ensures the attacker/defender doesn’t get more rolls than they have units to support. commit.
- Added generateListOptions for Colonize. When enabled, the order can be applied to any planet. commit.
- Added reinforcement messaging. commit.
- Added messaging to announce a game winner. commit.
Next Week:
- I’d like too spend a day or two next week buffing up my knowledge on C++. In particular I’d like to read Effective C++, as well as some other web resources I’ve been pointed to.
- Implement clearing of OrderQueues on conquerred planets.
- Create a slightly larger static map to facilitate testing and debugging of the ruleset now that it is playable.
- Implement a bonus for owning whole constellation.
- Implement the colonize order. I’d like to tie the order to the current risk_randomly_assign_planets flag. When false, players will start with a single home planet, and will be capable of bidding on planets with the colonize order. When true, players will be randomly assigned planets and will be unable to colonize any open space on the map; Players will still be able to colonize adjacent planets via the move order.