Friday, June 27, 2008

I spent this week working on my goals for the midterm. I implemented an algorithm which sorts all the orders by player (this will be used to implement the ordered turn system next week). I used the region system created last week to add code which finds a specific leader in a given region. This allowed me to implement the code which adds points to a player's score.

The way the scoring works is: when a system is colonized, the game searches for the leader of the type of colonist which just colonized the world (i.e. a merchant leader for ship of merchants). If a leader of the correct type is found in the region which the newly colonized system is in, then the owner of that leader gets 1 point of the same type as the colonist (i.e. 1 point in the "money" score for a merchant). If no leader of the correct type is found, but a settler leader is found in the region, then the point goes to the owner of the settler leader.

So far everything is on track for the midterm. Next week I will be working on getting everything finished for the midterm. The biggest things left are getting the ordered simultaneous turn finished and implementing the end game conditions.

0 comments:

Post a Comment