-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIA.cpp
39 lines (30 loc) · 1.01 KB
/
IA.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//============================================================================
// Name : IA.cpp
// Author : IR I IA2
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <thread>
#include "networking.h"
#include "genetic.h"
using namespace std;
int main(int argc, char * argv[]) {
if (argc != 3){
cout << "Erreur de nombre d'arguments !" << endl;
cout << "Usage : " << argv[0] << " <nom serveur> <port serveur>" << endl;
return -1;
}
cout << "!!! Lancement de l'IA algo génétique !!!" << endl;
cout << "L'IA va se connecter à la machine " << argv[1] << " sur le port " << argv[2] << "." << endl;
/*thread tConnect(connect("Hello"));
tConnect.join();
thread tGenetic(genetic("Test"));*/
init_semaphores();
thread tConnect(connexion, argv[1], stoi(argv[2]));
thread tGenetic(genetic, "Test");
tConnect.join();
tGenetic.join();
return 0;
}