Garret Smith: Transportation
Alan Everdeen: Commerce
James Estell: Construction
You double click a road tile to rotate, and double click a construction tile to begin building.
The tiles can be dragged out anywhere on the screen. Click the hand to scroll and click again to
exit scrolling and resume building. The magnifying glass changes the scale. All functionality
remains while zoomed.
As of part 2, instructions have been added to the file menu detailing new game play elements.
Transportation Decisions:
Transportation was implemented with many switch cases for each tile rotation. This method was
chosen so that each individual rotation could be saved and loaded correctly and easily. Also, it
allowed for one class to handle the switching of images for each tile type.
Commerce Decisions:
Unemployment is determined by the percentage of residents in the city without jobs.
Unemployment is considered to be reasonable if it is under 5 percent.
The number of starving people is determined by the amount of people the markets in the
city can provide for. Each market can provide for 500 people, so the number of people
minus the number of markets times 500 is the number of starving people in the city. Any number
of starving people is a bad statistic.
The number of job openings, which are jobs unfilled by residents of the city, is determined
by the amount of jobs minus the amount of people in the city. If there are more than 75 job openings
per production tile, that is considered a bad statistic.
The lost profits number is determined by the number of people in the city and the number of markets
in the city. It is considered bad if there are less than one hundred people per market, as that
results in lost profits for the markets.
Construction Decisions:
I made two functions to complete the task. The first of which was to create the grass plot for the
initial construction, once that is double-clicked it iniatiates the next class which is creates
the clearing progression as well as both the Ore Mine or the Stadium (which ever one was
randomly chosen).
For Part 2 of Project 1, we were planning on having some kind of simple resource system.
This will probably be as simple as requiring the user to haul coal before buildings can be made.
A point system will be in effect based on the amount of coal hauled and the buildings in the city.
When the user hits a certain point threshold, they will win, but be able to keep playing.
The game will be completely decided by the user. The screen will begin blank and the user may
build the city anyway they like. The current statistics and tiles will be saved and loaded if the user
would like the save the game and continue later.
Transportation will be required for coal to be hauled. It will also be required for construction
to begin. Coal will be transported if it is connected by roads to a port. It will then be added to
the users coal storage.
For the second part of project 1, we required the user to make use of a simple resources system
in order to build their city. Each building requires 100 coal to build and adds 10 points to your point
total, grass tiles however are free, but add no points. Hauling coal to your resource pool also granted
points. To win, you simple need to reach 1000 points. With all of the changes to game play, an instructions
option was added to the file menu with more details.
Instead of having it possible for coal mines and industrial buildings to be adjacent, we decided that it
would be best to require them to be connected with roads. A function for following roads was developed that
recursively follows the road path until an industrial building is found or the road ends. The same method was
used for construction sites.
Since our methods required the tiles to know who its neighboring tiles were, a visitor was created to compute this.
To be as efficient as possible, only the tiles that needed to know its neighbors were called by this visitor:
Transportation, Coal mines, Industrial buildings, and Construction sites.