Advertisement
Guest User

Untitled

a guest
Mar 16th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. bool WrongInput = true;
  2.             while (WrongInput)
  3.             {
  4.                 getline(cin, Input);
  5.                 if (!regex_match(Input, InputRegex)) { ErrorMessageGenerator(WrongFormat); continue; }
  6.                 int Index = Convert((int)Input[0], (int)Input[2]);
  7.                 vector<int> Empties = GameBoard.EmptyCells();
  8.                 if (find(Empties.begin(), Empties.end(), Index) == Empties.begin()) { ErrorMessageGenerator(WrongInput); continue; }
  9.                 WrongInput = false;
  10.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement