Retro_Gameboy
The purpose of this project is to create a GameBoy with classic games.
main.cpp
Go to the documentation of this file.
1 #include "../include/Tetris.h"
2 #include "../include/Arkanoid.h"
3 #include "../include/Snake.h"
4 
5 // Function Prototypes
6 void DisplayMenu();
7 
8 int main()
9 {
10 
11  DisplayMenu();
12 
13  int choice = 0;
14  std::cin>>choice;
15 
16  const choices::GAME selected = static_cast<choices::GAME>(choice);
17 
18  switch( selected )
19  {
20  case choices::TETRIS:
21  {
22  Tetris myTetris;
23  myTetris.PlayTetris();
24  break;
25  }
26  case choices::ARKANOID:
27  {
28  Arkanoid myArkanoid;
29  break;
30  }
31  case choices::SNAKE:
32  {
33  Snake mySnake;
34  break;
35  }
36  default:
37  {
38  std::cout<<" Invalid choice "<<std::endl;
39  break;
40  }
41  }
42 
43  return 0;
44 }
45 
47 {
48  std::cout<<"Please Select a Game"<<std::endl;
49  std::cout<<"Press 1 to Play Tetris."<<std::endl;
50  std::cout<<"Press 2 to Play Arkanoid."<<std::endl;
51  std::cout<<"Press 3 to Play Snake."<<std::endl;
52 }
Definition: Snake.h:7
Definition: Tetris.h:6
void PlayTetris()
Play Tetris Game.
Definition: Tetris.cpp:25
void DisplayMenu()
Definition: main.cpp:46
int main()
Definition: main.cpp:8