@ -96,6 +96,14 @@ void initializeBoard( bool board[BORAD_SIZE][BORAD_SIZE] ){
}
int handleGameInput( char* input ){
if( strstr(input, "set") != NULL ){
return 1;
}else{
return false;
int startMenu( int code ){
if( code == -1 ){ // command test
@ -31,6 +31,7 @@ char* getRulesMessageTicTacToe(void);
struct ticTacToe createTicTacToe();
int handleCommand( char* input );
void initializeBoard( bool board[3][3] );
int handleGameInput( char* input );
/* commands */
commandFunction getCommandById(int id);
@ -127,3 +127,15 @@ void test_initializeBoard(void){
void test_handleGameInput(void){
// arrange
char* teststring = "set 3,4";
int expectedState = 1;
// act
int actualState = handleGameInput( teststring );
// assert
TEST_ASSERT_EQUAL_INT( expectedState, actualState );