Add version display
This commit is contained in:
parent
e47e1e4f7a
commit
677f7f5be0
2 changed files with 17 additions and 7 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "utictactoe.h"
|
||||
|
||||
void help(){
|
||||
printf("usage: utictactoe ([-i LEVEL|-x N|-o N|-v|-V|-h] | -c FILE)\n");
|
||||
|
@ -48,21 +49,24 @@ int main(int argc, char* argv[]) {
|
|||
inception_level = 2;
|
||||
}
|
||||
break;
|
||||
case 'x': /* 'a' option */
|
||||
printf ("contest activated\n");
|
||||
case 'x':
|
||||
printf ("cross ai\n");
|
||||
cross_ai = true;
|
||||
break;
|
||||
|
||||
case 'o': /* 'a' option */
|
||||
printf ("contest activated\n");
|
||||
case 'o':
|
||||
printf ("round ai\n");
|
||||
round_ai = true;
|
||||
break;
|
||||
|
||||
case 'c': /* 'a' option */
|
||||
case 'c':
|
||||
printf ("contest activated\n");
|
||||
contest = true;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
printf("utictactoe %d.%d.%d\n", VERSION, SUBVERSION, REVISION);
|
||||
printf("This software implements a full ultimate tictactoe game.\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'h':
|
||||
help();
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef UTICTACTOE_H
|
||||
#define UTICTACTOE_H
|
||||
#define VERSION 1
|
||||
#define SUBVERSION 0
|
||||
#define REVISION 0
|
||||
#endif /* UTICTACTOE_H */
|
Loading…
Add table
Add a link
Reference in a new issue