@ -48,3 +48,9 @@ int x_wins_00_10_20(char board[][3]) {
return 1;
}
int x_wins_01_11_21(char board[][3]) {
if (board[0][1] == 'X' && board[1][1] == 'X' && board[2][1] == 'X') {
@ -91,4 +91,19 @@ void test_x_wins_onIndex_00_10_20(void)
TEST_ASSERT_EQUAL_INT(expected, actual);
void test_x_wins_onIndex_01_11_21(void)
{
/* arrange */
int actual;
int expected = 1;
char board[][3] = {{' ','X',' '}, {' ','X',' '}, {' ','X',' '}};
/* act */
actual = x_wins_01_11_21(board);
/* assert */
#endif