summaryrefslogtreecommitdiff
path: root/src/Controller/ConsoleController/ConsoleController.cpp
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-04-30 09:11:20 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-04-30 09:11:20 +0200
commit4b5f429c0d0f369c72ddd0b290769bf61ea83601 (patch)
tree27719bf8c2ad32c3cb51f4777da9f1712b7e15ee /src/Controller/ConsoleController/ConsoleController.cpp
parentfa88c91351388c4b2e1791ccab2cd8a959dc976b (diff)
Change controller name
Diffstat (limited to 'src/Controller/ConsoleController/ConsoleController.cpp')
-rw-r--r--src/Controller/ConsoleController/ConsoleController.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Controller/ConsoleController/ConsoleController.cpp b/src/Controller/ConsoleController/ConsoleController.cpp
index 44b598e..2231213 100644
--- a/src/Controller/ConsoleController/ConsoleController.cpp
+++ b/src/Controller/ConsoleController/ConsoleController.cpp
@@ -1,48 +1,48 @@
-#include "CTConsole.hpp"
+#include "ConsoleController.hpp"
-CTConsole::CTConsole()
+ConsoleController::ConsoleController()
{
m_game = new Game();
}
-CTConsole::~CTConsole()
+ConsoleController::~ConsoleController()
{
delete m_game;
}
-void CTConsole::play()
+void ConsoleController::play()
{
while (!m_game->isOver())
{
m_game->showGrid();
char moveChoice = ' ';
-
+
std::cin >> moveChoice;
-
+
switch (moveChoice)
{
case 'z':
std::cout << "up" << std::endl;
break;
-
+
case 's':
std::cout << "down" << std::endl;
break;
-
+
case 'q':
std::cout << "left" << std::endl;
break;
-
+
case 'd':
std::cout << "right" << std::endl;
break;
-
+
default:
break;
}
-
+
std::cout << std::endl;
-
+
m_game->pop();
}
-} \ No newline at end of file
+}