Team Members

Brian Harazim
Clayton Wilson
Fatema Alsaleh

Part 1

Whole Group - Design Decisions And Instructions

Counting Tiles

Fully overlapped tiles is found by counting the number of tiles on top or below a tile at a spot. For example 2 tiles on top of each other will count 1 for each tile giving 2. For 3 tiles fully overlapped, we will get 6 because there are 2 tiles above and below for each tile.

The total of partially overlapped tiles is found by counting the number of tiles that are within the width and the height of a particular tile. If two tiles are partially overlapped, the total will be 2, and if three are partially overlapped, the total would be 6. Fully overlapped tiles are counted as partially overlapped.

Count Tiles counts all the tiles on the screen no matter the type.

Scrolling

The scroll mechanic, when active, allows the mouse to click anywhere on the screen and drag the window depending on the way the mouse moves.

Zoom

The zoom mechanic starts at a scale of 1. It changes by a multiple of 2 depending on whether the plus or the minus was clicked. It will zoom in to 4 times the original size, and it will zoom out to .25 times the original size.

The city save for project 1 is called proj01City.

Individual Responsibilities

Clayton Wilson - Construction

The construction element to the program works by starting with construction class. This class inherits from the Tile class and provides the fundamental functionality for the two types of inherited construction types, Stadium and OreMine. The construction class contains functionality primarily for the first process of construction which is the clearing process. It has an initial image of a desert and when it is set to clear, it updates the image until the process is complete, and then calls any necessary animation features of a derived class via a virtual function. Class OreMine derives from Construction. It, unlike construction, is intended to be instantiated. It utilizes the clearing functionality of Construction, but also has additional functionality for animation of the ore mine. It also has specific saving functionality built in. Class Stadium derives from construction in the exact same way. The main difference is that for Stadium's animation functionality, it simply changes the image to a static image of a stadium. In child view, and random number generator determines which of the two derived construction classes is instantiated after selecting construct in the menu. There is also construction visitor class. The functionality of this class is to set the status of the construction object to clearing, when it needs to be cleared. The reason a visitor was chosen to do this is because in the double click handler, a regular setter function can not be called on object declared as 'auto tile.' A visitor is only sent to an object of type construction, and not one of any other type.

Brian Harazim - Commerce

There are menu options to add housing, factory, or shopping buildings. Each tile from these menu has its own unique job, shopping, or population values. The CTileCommerceVisitor class finds the cumulative sum of shopping, population, and jobs. Those values then get passed to the Commerce class which makes the calculation for the ratios. The ratio for shopping is determined by taking the shopping divided by population plus shopping divided by jobs. The ratio for factory is determined by total jobs divided by shopping plus jobs divided by population. The ratio for housing is population divided by jobs plus population divided by shopping. Based on the ratios, the color the text for the property is determined, red being bad and green being good. The commerce ratio is colored green if greater than 1.50 and less than 2.50 and red otherwise.

Fatema Alsaleh - Transportation

There is a menu option for transportation under landscape called “Road”. This menu option consists of seven menu options for adding different road types (straight, turn, ramp,...etc). Each road type can be rotated to suits the user preference. The road types cannot be rotated unless the rotation mode is on. The rotation mode menu option is located under the “Road” menu option.

Part 2 Game Idea

The main idea of the game is to protect sparty for a certain amount of time. The player will need to protect him from randomly spawned fire tiles that will start from the outside and make their way in. The fire will only be spawned adjacent to another fire tile or along the edge of the city. These fire tiles will overwhelm any tile previously there. In order to incorporate all the parts we will have apartments, markets, and factories that generate money when adjacent to a road and ore/coal mines that generate resources that are used to build new tiles along with money. When the ratios for the apratments/shops/factories are green they earn extra money. We plan on adding a new building that is a fire station. When the player builds a fire station they are allowed to hire firefighters to put out a fire on a tile. These firemen will cost money. All buildings and roads will cost a certain amount of ore/coal/money. The player will start with a small town to begin so it starts quicker. The fire will not start for a certain amount of time.

Part 2

Spartan Survival

Load the game under the tab for spartan survival.

Game Background

Sparty has entered the city of Ann Arbor. He is trying to build a statue. You will need to protect him for 2 minutes by building new buildings or roads in the city. Fire will randomly spawn on a tile and up to four adjacent tiles to start. After the first fire has been spawned, fire can only spawn on the adjacent tiles. You will be given $50 to start your city. You can use this $50 to build a new building or hire a fireman if you have a firestation in your city. The firemen can be used to put out a fire. The housing, factory, shopping, coal, and ore buildings have a way to collect money after a certain amount of time. There are menu items to collect the money from the different types of buildings. The money from the commerce buildings will be doubled if their ratio is green. Every building has its own production and cost. If your are able to protect Sparty for 2 minutes, then you win! GOOD LUCK!