コード例 #1
0
ファイル: Core.cpp プロジェクト: chabertfabien/Frog
void			Core::launch()
{
  Board*	game = new Board();
  int		key = 0;
  Graphic*	graph = new Graphic();
  float timer1 = 0;
  float timer2 = 0;

  game->initMap();
  while (hasLost(game->getMap()) && key != END)
    {
      graph->displayScreen(game);
      key = graph->getKey(&timer1, &timer2);
      std::cout << key << std::endl;
      moveFrog(key, game);
    }
  if (key == -1)
    std::cout << "You left the game! Coward!" << std::endl;
  else
    std::cout << "You lost the game!" << std::endl;
  std::cout << "Your score = " << this->score << std::endl;

}