-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
64 lines (56 loc) · 1.84 KB
/
Copy pathmain.cpp
File metadata and controls
64 lines (56 loc) · 1.84 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
53
54
55
56
57
58
59
60
61
62
63
64
//
// main.cpp
// NoDeal
//
// Created by Suneeth Torke on 3/6/20.
// Copyright © 2020 Suneeth Torke. All rights reserved.
//
#include <iostream>
#include <vector>
#include "Game.hpp"
#include "Case.hpp"
#include <random>
using namespace std;
void print_header() {
cout << " | || | | || | | | | | | | | | || | | | || | " << endl;
cout << " | || | | || | |DEAL OR NO DEAL| | || | | | || | " << endl;
cout << " | || | | || | | | | | | | | | || | | | || |" << endl;
}
void print_intro() {
cout << endl;
cout << " Welcome to Deal or No Deal. I’m your host, Howie Mandel," << endl;
cout << " and we're in for an exciting time! One million dollars is" << endl;
cout << " at stake tonight. Will our contestant be able to win some " << endl;
cout << " money, or will our banker be able to get the best of them?" << endl;
}
void print_rules() {
cout << endl;
cout << " The rules are ~simple: " << endl;
cout << " 1. Pick a case to hold (personal case)" << endl;
cout << " 2. Select the prompted number of cases to open" << endl;
cout << " 3. If the banker offers you a deal choose DEAL or NO DEAL!" << endl;
cout << endl;
cout << " Good Luck!" << endl;
}
void print_closer() {
cout << " | || | | || | | | Thanks | | | | | | | | | | " << endl;
cout << " | || | | || | |For Playing | | || | | | || | ";
}
int main() {
print_header();
print_intro();
print_rules();
Game game = Game();
game.construct_suite();
game.hold_case();
game.construct_wall();
while (game.get_status()) {
game.print_suite();
game.input_case_handler();
game.print_wall();
game.broker_handler();
game.update_round();
}
game.initiate_ending();
print_closer();
}