Browse Source

Added input operation handler operation check

remotes/origin/develop
Eric Bagus 11 months ago
parent
commit
2aa1aaa17d
  1. 10
      src/operationHandler.c
  2. 7
      src/operationHandler.h

10
src/operationHandler.c

@ -0,0 +1,10 @@
#include "operationHandler.h"
#include <stdbool.h>
bool checkOperationInput(int input) {
switch (input) {
case 4: case 3: case 2: case 1:
return true;
}
return false;
}

7
src/operationHandler.h

@ -0,0 +1,7 @@
#ifndef THEADMIRALS_OPERATIONHANDLER_H
#define THEADMIRALS_OPERATIONHANDLER_H
#include <stdbool.h>
bool checkOperationInput(int);
#endif //THEADMIRALS_OPERATIONHANDLER_H
Loading…
Cancel
Save