Modified Turn Response Protocol, added handling for SIGPIPE, changed placeholder...
[progcomp2012.git] / samples / forfax / main.cpp
1 #include <cstdlib>
2 #include <iostream>
3
4 #include "forfax.h"
5
6 using namespace std;
7
8 #include <stdio.h>
9 void quit();
10 Forfax forfax;
11 int main(int argc, char ** argv)
12 {
13         setbuf(stdin, NULL);
14         setbuf(stdout, NULL);
15
16         atexit(&quit);
17
18         if (!forfax.Setup())
19                 exit(EXIT_SUCCESS);
20
21         while (forfax.MakeMove());
22
23         cerr << "Forfax threw a hissy fit, and exited!\n";
24         
25         exit(EXIT_SUCCESS);
26         return 0;
27
28         
29 }
30
31 void quit()
32 {
33         cerr << " Forfax quit\n";
34 }

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