import java.awt.Color;

import becker.robots.*;
/**
 * This driver class was  prepared for the ICS2O course in support of the 
 * <a href="http://darcy.rsgc.on.ca/ACES/ICS2O/1112RobotProgrammingProjects.htm#Election">Elections Programming Project</a>. 
 * A Riding (City) object is populated with party-affiliated voters (coloured Things) that are to be collected 
 * by the respective Threaded candidates. <b>Date: 2012 04 28.</b>   
 * @author C. D'Arcy
 */
public class Election {

	public static void main(String[] args) {

		// Instantiate a voter-populated extension of a City 
		Riding riding = new Riding();
		// Display the vote counts so we can confirm the accuracy at the end of the simulation
		riding.showThingCounts(true);
		riding.setFrameTitle("2015 Federal Election");

		// Instantiate the respective candidates for the riding
		Politician pc = new PCCandidate(riding);
		Politician lib = new LiberalCandidate(riding);
		Politician ndp = new NDPCandidate(riding);
		Politician green = new GreenCandidate(riding);

		// Assign each politician to a thread and turn 'em loose...
		Thread pcThread = new Thread(pc);
		pcThread.start();
		Thread libThread = new Thread(lib);
		libThread.start();
		Thread ndpThread = new Thread(ndp);
		ndpThread.start();
		Thread greenThread = new Thread(green);
		greenThread.start();

	}

}
