init commit

This commit is contained in:
2024-11-12 17:41:10 +01:00
parent 1e4f1f955b
commit 20bc9108d3
146 changed files with 24465 additions and 0 deletions

58
server/AutoPilot.cpp Normal file
View File

@@ -0,0 +1,58 @@
#include <iostream>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>
#include "game.h"
using namespace std;
void showHelp()
{
cout << " -n pas de Pré apprentissage" << endl;
cout << " -s ne pas afficher d'output dans la console" << endl;
cout << " -h afficher cette aide " << endl;
}
int main(int argc, char *argv[])
{
Game G;
int i,prelearn=1;
bool showoutput=1;
for (i=1;i<argc;i++)
{
if(!strcmp("-n",argv[i])) prelearn=0;
if(!strcmp("-s",argv[i])) showoutput=0;
if(!strcmp("-h",argv[i]))
{
showHelp();
return 1;
}
}
G.toggleShow(showoutput);
if(prelearn)
{
cout << "Learn ....\n";
G.preLearn();
G.preTest();
cout << "Learn OK ...\n";
cout << "press a key !\n";
cin >> i;
}
cout << "Start interface\n";
if(fork()==0)
{
chdir("InterfaceCpp");
execv("iface",argv);
}
else
{
G.Run();
exit(0);
}
return 0;
}