2 * agent++ : A Sample agent for UCC::Progcomp2013
4 * @purpose The main function
10 #include "agent.h" // Declarations for agent, see also agent.cpp
16 * @purpose The main function; starts the agent
17 * @param argc - Number of arguments, unused
18 * @param argv - Argument string array, unused
20 int main(int argc, char ** argv)
22 srand(time(NULL)); // seed random number generator
24 string colour; cin >> colour; // first read the colour of the agent
28 Agent agent(colour); // create an agent using the colour
29 agent.Run(cin, cout); // run the agent (it will read from cin and output to cout)
31 catch (const Exception & e)
37 return 0; // Don't use exit(3), because it causes memory leaks in the C++ stdlib