-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
52 lines (43 loc) · 1.66 KB
/
main.cpp
File metadata and controls
52 lines (43 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include "router.hpp"
using namespace std;
int main(){
cout<<"+--------------------------------------------------+"<<endl;
cout<<"| WELCOME TO THE BOARD GAME MAKER |"<<endl;
cout<<"| you can create any board game in less than 30min |"<<endl;
cout<<"| all you have to do is code the rules add pieces |"<<endl;
cout<<"| design your board and you are good to go |"<<endl;
cout<<"+--------------------------------------------------+"<<endl;
while(true){
cout<<"You can alrady start playing some pre-made games, Enjoy..."<<endl;
cout<<"Choose a number to play: "<<endl;
cout<<"1- Chess"<<endl;
cout<<"2- Shatranj"<<endl;
cout<<"3- Checkers"<<endl;
cout<<"4- Dunsany Chess"<<endl;
cout<<"5- exit"<<endl;
int s;
while(true){
cin>>s;
if((s | 0x000000ff) > 0 && (s | 0x000000ff) < 64){
break;
}
if(s <= 0 || s > 5){
cout<<"Choose a correct number !"<<endl;
continue;
}
break;
}
if(s == 1) Router::get("chessGame");
else if(s == 2) Router::get("shatranjGame");
else if(s == 3) Router::get("checkersGame");
else if(s == 4) Router::get("dunsanyChessGame");
else if(s == 5){
cout<<"BYE, See you soon ! \n---- Programe ended ! ----"<<endl;
break;
}
}
return 0;
}