forked from KhalidMujahid/CppGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.cpp
69 lines (48 loc) · 1.15 KB
/
game.cpp
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
53
54
55
56
57
58
59
60
/*
* Author: Khalid Zikirullah
* Title: Question and Answer C++ Program
* Main file
*/
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#include "game.h"
int main()
{
long int s;
time(&s);
std::string time = ctime(&s);
std::cout << "\t\t\t " << time << std::endl;
if(time <= "12") std::cout << "\t\t\t Good morining.." << std::endl;
else std::cout << "\t\t\t Good Day.." << std::endl;
//object
Game_Base_One game_base_one;
Game_Base_Two game_base_two;
Game_Base_Three game_base_three;
std::string input;
std::cout << "Select Subject:" << std::endl;
std::cout << "1 - Maths \n 2 - English \n 3 - coding" << std::endl;
std::cout << " >";
std::cin >> input;
if(input == "1")
{
game_base_one.maths_board();
game_base_one.maths_board_result();
}
else if(input == "2")
{
game_base_two.english_board();
game_base_two.english_board_result();
}
else if(input == "3")
{
game_base_three.coding_board();
game_base_three.coding_board_result();
}
else
{
std::cout << "Wrong selection " << std::endl;
}
return 0;
}