Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool WrongInput = true;
- while (WrongInput)
- {
- getline(cin, Input);
- if (!regex_match(Input, InputRegex)) { ErrorMessageGenerator(WrongFormat); continue; }
- int Index = Convert((int)Input[0], (int)Input[2]);
- vector<int> Empties = GameBoard.EmptyCells();
- if (find(Empties.begin(), Empties.end(), Index) == Empties.begin()) { ErrorMessageGenerator(WrongInput); continue; }
- WrongInput = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement