Trying to do Simple tic tac toe game without functions

Is it possible to put the code below into a do while sort of loop that will stop the code if it meets the requirements of the win conditions?

if (tictactoe_game[0][0] == 'X' && tictactoe_game[0][1] == 'X' && tictactoe_game[0][2] == 'X')
return 'X';
if (tictactoe_game[1][0] == 'X' && tictactoe_game[1][1] == 'X' && tictactoe_game[1][2] == 'X')
return 'X';
if (tictactoe_game[2][0] == 'X' && tictactoe_game[2][1] == 'X' && tictactoe_game[2][2] == 'X')
return 'X';

if (tictactoe_game[0][0] == 'X' && tictactoe_game[1][0] == 'X' && tictactoe_game[2][0] == 'X')
return 'X';
if (tictactoe_game[0][1] == 'X' && tictactoe_game[1][1] == 'X' && tictactoe_game[2][1] == 'X')
return 'X';
if (tictactoe_game[0][2] == 'X' && tictactoe_game[1][2] == 'X' && tictactoe_game[2][2] == 'X')
return 'X';

if (tictactoe_game[0][0] == 'X' && tictactoe_game[1][1] == 'X' && tictactoe_game[2][2] == 'X')
return 'X';
if (tictactoe_game[2][0] == 'X' && tictactoe_game[1][1] == 'X' && tictactoe_game[0][2] == 'X')
return 'X';
Yes.
Thanks :)
Topic archived. No new replies allowed.