Change controller name

This commit is contained in:
manzerbredes 2015-04-30 09:11:20 +02:00
parent fa88c91351
commit 4b5f429c0d
2 changed files with 20 additions and 20 deletions

View file

@ -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();
}
}
}

View file

@ -9,18 +9,18 @@
#include <iostream>
#include "../Model/Game.hpp"
#include "../../Model/Game.hpp"
class CTConsole
class ConsoleController
{
private:
Game * m_game;
public:
CTConsole();
~CTConsole();
ConsoleController();
~ConsoleController();
void play();
};
#endif
#endif