-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
executable file
·41 lines (39 loc) · 963 Bytes
/
main.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
#include <iostream>
#include "game.h"
#include <stdio.h>
using namespace std;
int main(){
//init
cout << "Welcome to Las Vegas!" << endl;
cout << "1: PLAY" << endl;
cout << "2: QUIT" << endl;
deck my_deck;
game my_game(&my_deck);
char option = getchar();
while(option != '1' and option != '2'){
cout << "PRESS 1 or 2" << endl;
option = getchar();
}
if(option == '2'){
cout << "DON'T YOU REALLY WANT TO TRY ONCE? BYE~" << endl;
return 0;
}
do{
cout << "GAME BEGIN!" << endl;
my_deck.shuffle();
my_game.first_show();
cout << "PRESS ANY KEY TO DRAW CARD" << endl;
cout << "CURRENT SCORE:" << endl;
cout << "1: CONTINUE" << endl;
cout << "2: QUIT" << endl;
option = getchar();
while(option != '1' and option != '2'){
cout << "PRESS 1 or 2" << endl;
option = getchar();
}
if(option == '2'){
cout << "DON'T YOU REALLY WANT TO TRY MORE? BYE~" << endl;
return 0;
}
}while(option == '1');
}