Input clearing
This commit is contained in:
parent
b595f3d51e
commit
b280ddde19
1 changed files with 8 additions and 0 deletions
8
main.cpp
8
main.cpp
|
@ -32,6 +32,14 @@ int main(int argc, char* argv[]) {
|
||||||
cin >> sequence[n];
|
cin >> sequence[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clearing
|
||||||
|
if(N < 1) return 1;
|
||||||
|
if(M < 1) return 1;
|
||||||
|
if(player != HUMAN && player != BOT) return 1;
|
||||||
|
if(gen != HUMAN && gen != RANDOM) return 1;
|
||||||
|
for(auto col : sequence)
|
||||||
|
if(col < 0 || col >= M) return 1;
|
||||||
|
|
||||||
// Human info
|
// Human info
|
||||||
if(player == HUMAN) {
|
if(player == HUMAN) {
|
||||||
cout << std::endl;
|
cout << std::endl;
|
||||||
|
|
Loading…
Reference in a new issue