summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-05-02 19:26:01 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-05-02 19:26:01 +0200
commit36d033caeebd8ccbddf711825a5a96e3930438be (patch)
tree07fb279618fdae06aaf148368b607a78ac6823b3 /src/main.cpp
parent27d646af15bc9147a141aced8cebd30668de9a8e (diff)
Make clean code
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 24a6af6..a7abcae 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,14 +3,13 @@
#include <iostream>
#include <string>
#include <time.h>
+#include <tuple>
//----------------------
//----- Personnal include -----
#include "./Model/Grid.hpp"
-#include "./Controllers/ConsoleController/ConsoleController.hpp"
//-----------------------------
-#include "./Model/Cell.hpp"
//#include "./Model/Elements/StringElement.hpp"
//----- Start -----
@@ -19,28 +18,29 @@
int main()
{
- Cell<StringElement> *cell1 = new Cell<StringElement>("");
- Cell<StringElement> *cell2 = new Cell<StringElement>("i");
-
-
- if(cell2->isEmpty()){
- std::cout << "Empty" << std::endl;
- }
- else{
- std::cout << "Not empty" << std::endl;
- }
-
//Init random
srand(time(NULL));
+
+ Grid a;
+ std::cout << a.description();
+ std::cout << std::get<0>(a.getRandomEmptyCellCoord()) << ","<< std::get<1>(a.getRandomEmptyCellCoord());
+ while(1){
+
+ std::tuple<int, int> c(a.getRandomEmptyCellCoord());
+ a.setCell(1,2, 15);
+ std::cout << a.description();
+ std::string chaine;
+ std::cin >> chaine;
+ }
//Init console controller
- ConsoleController * controller = new ConsoleController();
+ //ConsoleController * controller = new ConsoleController();
//Launch game
- controller->play();
+ //controller->play();
//Remove controlelr
- delete controller;
+ //delete controller;
return 0;
}