#include <iostream> #include <cstdlib> #include <ctime> #include <windows.h> using namespace std; int rouletteGen(); int main() { //-------- //| Idea | //-------- //cout << box 1 << box 2 << endl; int wheel, a, b, c, time, cA, cB, cC; a = 0; b = 0; c = 0; time = 500; while (a > 1) { cC = rouletteGen(); if (cC >= 0 && cC <= 15) { cC = 1; } else if (cC >= 16 && cC <= 30) { cC = 2; } else if (cC == 31) { cC = 0; } cout << " _l_" << endl; cout << " \l/" << endl; cout << "_______ _______ _______" << endl; cout << "I I I I I I" << endl; cout << "I "<< " " <<" I I "<< " " <<" I I "<< cC<<" I" << endl; cout << "I I I I I I" << endl; cout << "_______ _______ _______" << endl; Sleep(250); c++; while (b > 1) { cB = cC; cC = rouletteGen(); if (cC >= 0 && cC <= 15) { cC = 1; } else if (cC >= 16 && cC <= 30) { cC = 2; } else if (cC == 31) { cC = 0; } cout << " _l_" << endl; cout << " \l/" << endl; cout << "_______ _______ _______" << endl; cout << "I I I I I I" << endl; cout << "I " << " " << " I I " << cB << " I I " << cC << " I" << endl; cout << "I I I I I I" << endl; cout << "_______ _______ _______" << endl; cin.get(); c++; Sleep(250); while (c >= 15) { cA = cB; cB = cC; cC = rouletteGen(); if (cC >= 0 && cC <= 15) { cC = 1; } else if (cC >= 16 && cC <= 30) { cC = 2; } else if (cC == 31) { cC = 0; } cout << " _l_" << endl;cout << " \l/" << endl; cout << "_______ _______ _______" << endl; cout << "I I I I I I" << endl; cout << "I " << cA << " I I " << cB << " I I " << cC << " I" << endl; cout << "I I I I I I" << endl; cout << "_______ _______ _______" << endl; Sleep(time); time += 100; return 0; } return 0; } return 0; } return 0; } int rouletteGen() { int dice; srand(time(NULL)); dice = rand() % 31; dice = dice + 1; return dice; }
a = 0; while (a > 1)
while (a > 1)
false
a = 0;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)