From 1b1ab1afee7c059091e8182be5cf7f31da4d16b5 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 4 Mar 2017 10:46:00 +0100 Subject: Initial initial pre-alpha-alpha GUI code --- main.cpp | 149 --------------------------------------------------------------- 1 file changed, 149 deletions(-) delete mode 100644 main.cpp (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp deleted file mode 100644 index e1e94f8..0000000 --- a/main.cpp +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "params.h" -#include "world.h" -#include "parse.h" - -#ifndef _WIN32 -# include -#endif - -using namespace std; - - -static ScreenBuffer *sb; - -#ifndef _WIN32 -static void signalHandler(int sig){ - if(sig==SIGINT){ - sb->emergencyDeinit(); - _exit(130); - } -} -#endif - - -struct RobotSpec{ - string fname; - bool random; - int x,y,heading; -}; - -int parseInt(const char *str){ - char *endp; - int v=strtol(str,&endp,10); - if(str[0]=='\0'||*endp!='\0'){ - cerr<<"Invalid number '"<]* [-p ]* [-s ] [-t]"< teams; - - vector robotSpecs; - int sleeptime=3000; - bool step = false; - - if(argc<=1){ - usage(argv); - return 1; - } - - for(int i=1;i=argc-1){ - cerr<<"Expected file name after '-r'"<=argc-4){ - cerr<<"Expected file name, x, y and heading after '-p'"<=argc-1){ - cerr<<"Expected sleep time after '-s'"<draw(); - for(int i=0;imvprintf(0, SIZE, "step: %5i", i+2); - sb->draw(); - } - delete sb; -} -- cgit v1.2.3-70-g09d2