-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
47 lines (44 loc) · 1009 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
42
43
44
45
46
47
//
// main.cpp
// Game
//
// Created by Kali Nathalie on 15/10/16;
// Copyright (c) 2016 Kali Nathalie. All rights reserved.
//
#include <iostream>
#include "Game.h"
#include "Players.h"
#include "stdlib.h"
using namespace std;
int main(){
system("clear");
cout << " Welcome to the DiceGame -0.02" << endl;
cout << "----------------------------------------------" << endl;
cout << "How many players will to play?" << endl;
int players;
cin >> players;
if(players <= 0){
cout << "Nobody wants play" << endl;
return 0;
}
if(players == 1){
cout << "Dont be a Forever Alone" << endl;
return 0;
}
Game* game = new Game();
for(int i=1; i<=players; i++){
game->Insert(0);
}
cout << "Which the max number?" << endl;
int Limit;
cin >> Limit;
if(Limit <= 0){
cout << "Nobody wants play" << endl;
return 0;
}
game->setLimit(Limit);
cout << "==============================================" << endl;
cout << " Game started!" << endl;
game->Playing();
return 0;
}