Guest User

Untitled

a guest
Oct 15th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. //CommandPrompt DeathNote
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main (){
  7. string FirstName[128];
  8. string Username[128];
  9. string Password[128];
  10. bool DeadPlayer[128];
  11. int AmountOfPlayers;
  12. cout << "How many humans will be participating? ";
  13. cin >> AmountOfPlayers;
  14. cout << "The initialization phase will now begin." << endl << "During this phase, only one person should be present at the command prompt.";
  15. cout << "You will be asked to enter:" << endl << endl << "1) Your first name" << endl << "2) A username" << endl << "3) A password" << endl << endl;
  16. cout << "These will be used to identify you as a target, and as a candidate to use the command promt." << endl <<endl;
  17. cout << endl << "Very well." << endl << "Press Enter to begin the initialization phase..";
  18. cin.get();
  19. cin.get();
  20. system("CLS");
  21. int i=0;
  22. while(i<AmountOfPlayers){
  23.  
  24. cout << "First name : ";
  25. cin >> FirstName[i];
  26.  
  27. cout << "Username : ";
  28. cin >> Username[i];
  29.  
  30. cout << "Password : ";
  31. cin >> Password[i];
  32.  
  33. cout << endl << endl << "After reading this message, press Enter, leave the room, and let the next candidate come forth.";
  34. cin.get();
  35. system("CLS");
  36. i++;
  37. continue;
  38. }
  39. cout << "The initialization phase has now ended, and the game has begun." << endl << "Gather every candidate now, and proceed only when everybody is present.";
  40. getchar();
  41. system("CLS");
  42. cout << "The rules will now be explained:" << endl << endl << "RULES HERE!!!" << endl << endl;
  43. cout << "Press Enter to unleash the command prompt";
  44. cin.get();
  45. system("CLS");
  46. string EnteredUsername;
  47. string EnteredPassword;
  48.  
  49. bool Gameover=false;
  50. while(Gameover==false){
  51. cout << "PRESS ENTER TO LOGIN";
  52. cin.get();
  53. cout << "USERNAME: ";
  54. cin >> EnteredUsername;
  55. int LoginCheck;
  56. i=-1;
  57. while(EnteredUsername!=Username[i]){
  58. cout << i;
  59. i++;
  60. LoginCheck=i;
  61. }
  62. cout << LoginCheck << endl;
  63. cout << "PASSWORD: ";
  64. cin >> EnteredPassword;
  65. if((EnteredUsername == Username[LoginCheck]) && (EnteredPassword == Password[LoginCheck]))
  66. cout << "LOGIN SUCCESFULL..";
  67. cout << "DENIED.";
  68.  
  69. }
  70. getchar();
  71. return 0;
  72. }
Add Comment
Please, Sign In to add comment