int main() { GameEngine(); //UnitTests(); std::cout << "\n \n Finished!! \n\n"; return 0; }
int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!" << std::endl; GameEngine game = GameEngine(std::bind(quit)); while (running){ std::string line; std::cout << " > "; std::getline(std::cin, line); auto out = game.play(line); std::cout << out << std::endl; } return 0; }
int main (int argc, char **argv) { displayMap (); updateDisplay (); int read_file = open (SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); //fcntl (read_file, F_SETFL, 0); if (read_file == -1) printf ("could not open port\n"); else { while (1) { //serialIn char input;//= getchar ();// interrupt driven serial input in 8051 char encodedByte; read (read_file, &input, 1); if (input == 27) { read (read_file, &input, 1); if (input == 91) { read (read_file, &input, 1); encodedByte = serial2nibble (input); } } else encodedByte = serial2nibble (input); GameEngine (encodedByte); updateDisplay (); usleep (500000); } close (read_file); } return 0; }