Add explanation of Board.pieces
[progcomp2013.git] / agents / agent++ / main.cpp
1 /**
2  * agent++ : A Sample agent for UCC::Progcomp2013
3  * @file main.cpp
4  * @purpose The main function 
5  */
6 #include <cstdlib>
7 #include <cstdio>
8 #include <iostream>
9
10 #include "agent.h" // Declarations for agent, see also agent.cpp
11
12 using namespace std;
13
14 /**
15  * @funct main
16  * @purpose The main function; starts the agent
17  * @param argc - Number of arguments, unused
18  * @param argv - Argument string array, unused
19  */
20 int main(int argc, char ** argv)
21 {
22         srand(time(NULL)); // seed random number generator
23
24         string colour; cin >> colour; // first read the colour of the agent
25         Agent agent(colour); // create an agent using the colour
26         agent.Run(cin, cout); // run the agent (it will read from cin and output to cout)
27         
28         return 0; // Don't use exit(3), because it causes memory leaks in the C++ stdlib
29 }

UCC git Repository :: git.ucc.asn.au