Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //CommandPrompt DeathNote
- #include <iostream>
- #include <string>
- using namespace std;
- int main (){
- string FirstName[128];
- string Username[128];
- string Password[128];
- bool DeadPlayer[128];
- int AmountOfPlayers;
- cout << "How many humans will be participating? ";
- cin >> AmountOfPlayers;
- cout << "The initialization phase will now begin." << endl << "During this phase, only one person should be present at the command prompt.";
- cout << "You will be asked to enter:" << endl << endl << "1) Your first name" << endl << "2) A username" << endl << "3) A password" << endl << endl;
- cout << "These will be used to identify you as a target, and as a candidate to use the command promt." << endl <<endl;
- cout << endl << "Very well." << endl << "Press Enter to begin the initialization phase..";
- cin.get();
- cin.get();
- system("CLS");
- int i=0;
- while(i<AmountOfPlayers){
- cout << "First name : ";
- cin >> FirstName[i];
- cout << "Username : ";
- cin >> Username[i];
- cout << "Password : ";
- cin >> Password[i];
- cout << endl << endl << "After reading this message, press Enter, leave the room, and let the next candidate come forth.";
- cin.get();
- system("CLS");
- i++;
- continue;
- }
- cout << "The initialization phase has now ended, and the game has begun." << endl << "Gather every candidate now, and proceed only when everybody is present.";
- getchar();
- system("CLS");
- cout << "The rules will now be explained:" << endl << endl << "RULES HERE!!!" << endl << endl;
- cout << "Press Enter to unleash the command prompt";
- cin.get();
- system("CLS");
- string EnteredUsername;
- string EnteredPassword;
- bool Gameover=false;
- while(Gameover==false){
- cout << "PRESS ENTER TO LOGIN";
- cin.get();
- cout << "USERNAME: ";
- cin >> EnteredUsername;
- int LoginCheck;
- i=-1;
- while(EnteredUsername!=Username[i]){
- cout << i;
- i++;
- LoginCheck=i;
- }
- cout << LoginCheck << endl;
- cout << "PASSWORD: ";
- cin >> EnteredPassword;
- if((EnteredUsername == Username[LoginCheck]) && (EnteredPassword == Password[LoginCheck]))
- cout << "LOGIN SUCCESFULL..";
- cout << "DENIED.";
- }
- getchar();
- return 0;
- }
Add Comment
Please, Sign In to add comment