Tic tac toe game in C stuck in a loop when finding a random number for the opponent









up vote
-2
down vote

favorite












I started C and I am trying to write a tic tac toe with an opponent which searches a random number between 1 to 9 and then fill the slot with “O”. However, when the random number detects an occupied slot, it will continue to fill other empty slots without giving the player the turn. How do I resolve this?



I made two arrays, one for the game screen, one for the memory of the slots.



I’m sorry I couldn’t chuck out the code since I thought it’s all important and is there any better way to do this? Sorry for my writing style if it is a bit confusing, and I think there are unimportant variables.



Here is my code:



#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char values[3][4] = // screen board
46, 46, 46,'n',
46, 46, 46,'n',
46, 46, 46,'n'
;

double memory[3][4] = // memory board to put values
0, 0, 0,'n',
0, 0, 0,'n',
0, 0, 0,'n'
;

int player(int i, char values[3][4])
int input;

printf("enter position: ");
scanf("%i", &input);

int x = (((input) / 3.3) - 3) * -1; // important math to convert to num
int y = (input + 2) % 3; // important math to convert to num

if (memory[x][y] == 0)
values[x][y] = 'X';
memory[x][y] = 1;

printf("%s", values);
getchar();
return 0;
getchar();
else
printf("Wrong!, choose another linen");
printf("%s", values);

getchar();

player(i, values);




int opponent(char values[3][4]) //function opponent
int count = 0;
srand(time(NULL));

int random = (rand() % 9) + 1; // create random number

for (count = 0; count < 9; count++)
int x = (((random) / 3.3) - 3) * -1;
int y = (random + 2) % 3;

if (memory[x][y] == 0) // if memory is empty, do the following, loop stucks here
values[x][y] = 'O';
memory[x][y] = 2;

printf("Opponent Moven");
printf("%s", values);

count++;

return 0;
else // if memory is not 0, do this. Error starts here
getchar();
printf("Move is %i", random);

opponent(values); // it calls itself to do a loop,




int main()
int input;
int i = 2;;

for (i = 2; i < 9; i++)
player(i, values); //Player goes first
getchar();
opponent(values);











share|improve this question























  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Samuel Liew
    Nov 10 at 0:17














up vote
-2
down vote

favorite












I started C and I am trying to write a tic tac toe with an opponent which searches a random number between 1 to 9 and then fill the slot with “O”. However, when the random number detects an occupied slot, it will continue to fill other empty slots without giving the player the turn. How do I resolve this?



I made two arrays, one for the game screen, one for the memory of the slots.



I’m sorry I couldn’t chuck out the code since I thought it’s all important and is there any better way to do this? Sorry for my writing style if it is a bit confusing, and I think there are unimportant variables.



Here is my code:



#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char values[3][4] = // screen board
46, 46, 46,'n',
46, 46, 46,'n',
46, 46, 46,'n'
;

double memory[3][4] = // memory board to put values
0, 0, 0,'n',
0, 0, 0,'n',
0, 0, 0,'n'
;

int player(int i, char values[3][4])
int input;

printf("enter position: ");
scanf("%i", &input);

int x = (((input) / 3.3) - 3) * -1; // important math to convert to num
int y = (input + 2) % 3; // important math to convert to num

if (memory[x][y] == 0)
values[x][y] = 'X';
memory[x][y] = 1;

printf("%s", values);
getchar();
return 0;
getchar();
else
printf("Wrong!, choose another linen");
printf("%s", values);

getchar();

player(i, values);




int opponent(char values[3][4]) //function opponent
int count = 0;
srand(time(NULL));

int random = (rand() % 9) + 1; // create random number

for (count = 0; count < 9; count++)
int x = (((random) / 3.3) - 3) * -1;
int y = (random + 2) % 3;

if (memory[x][y] == 0) // if memory is empty, do the following, loop stucks here
values[x][y] = 'O';
memory[x][y] = 2;

printf("Opponent Moven");
printf("%s", values);

count++;

return 0;
else // if memory is not 0, do this. Error starts here
getchar();
printf("Move is %i", random);

opponent(values); // it calls itself to do a loop,




int main()
int input;
int i = 2;;

for (i = 2; i < 9; i++)
player(i, values); //Player goes first
getchar();
opponent(values);











share|improve this question























  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Samuel Liew
    Nov 10 at 0:17












up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











I started C and I am trying to write a tic tac toe with an opponent which searches a random number between 1 to 9 and then fill the slot with “O”. However, when the random number detects an occupied slot, it will continue to fill other empty slots without giving the player the turn. How do I resolve this?



I made two arrays, one for the game screen, one for the memory of the slots.



I’m sorry I couldn’t chuck out the code since I thought it’s all important and is there any better way to do this? Sorry for my writing style if it is a bit confusing, and I think there are unimportant variables.



Here is my code:



#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char values[3][4] = // screen board
46, 46, 46,'n',
46, 46, 46,'n',
46, 46, 46,'n'
;

double memory[3][4] = // memory board to put values
0, 0, 0,'n',
0, 0, 0,'n',
0, 0, 0,'n'
;

int player(int i, char values[3][4])
int input;

printf("enter position: ");
scanf("%i", &input);

int x = (((input) / 3.3) - 3) * -1; // important math to convert to num
int y = (input + 2) % 3; // important math to convert to num

if (memory[x][y] == 0)
values[x][y] = 'X';
memory[x][y] = 1;

printf("%s", values);
getchar();
return 0;
getchar();
else
printf("Wrong!, choose another linen");
printf("%s", values);

getchar();

player(i, values);




int opponent(char values[3][4]) //function opponent
int count = 0;
srand(time(NULL));

int random = (rand() % 9) + 1; // create random number

for (count = 0; count < 9; count++)
int x = (((random) / 3.3) - 3) * -1;
int y = (random + 2) % 3;

if (memory[x][y] == 0) // if memory is empty, do the following, loop stucks here
values[x][y] = 'O';
memory[x][y] = 2;

printf("Opponent Moven");
printf("%s", values);

count++;

return 0;
else // if memory is not 0, do this. Error starts here
getchar();
printf("Move is %i", random);

opponent(values); // it calls itself to do a loop,




int main()
int input;
int i = 2;;

for (i = 2; i < 9; i++)
player(i, values); //Player goes first
getchar();
opponent(values);











share|improve this question















I started C and I am trying to write a tic tac toe with an opponent which searches a random number between 1 to 9 and then fill the slot with “O”. However, when the random number detects an occupied slot, it will continue to fill other empty slots without giving the player the turn. How do I resolve this?



I made two arrays, one for the game screen, one for the memory of the slots.



I’m sorry I couldn’t chuck out the code since I thought it’s all important and is there any better way to do this? Sorry for my writing style if it is a bit confusing, and I think there are unimportant variables.



Here is my code:



#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char values[3][4] = // screen board
46, 46, 46,'n',
46, 46, 46,'n',
46, 46, 46,'n'
;

double memory[3][4] = // memory board to put values
0, 0, 0,'n',
0, 0, 0,'n',
0, 0, 0,'n'
;

int player(int i, char values[3][4])
int input;

printf("enter position: ");
scanf("%i", &input);

int x = (((input) / 3.3) - 3) * -1; // important math to convert to num
int y = (input + 2) % 3; // important math to convert to num

if (memory[x][y] == 0)
values[x][y] = 'X';
memory[x][y] = 1;

printf("%s", values);
getchar();
return 0;
getchar();
else
printf("Wrong!, choose another linen");
printf("%s", values);

getchar();

player(i, values);




int opponent(char values[3][4]) //function opponent
int count = 0;
srand(time(NULL));

int random = (rand() % 9) + 1; // create random number

for (count = 0; count < 9; count++)
int x = (((random) / 3.3) - 3) * -1;
int y = (random + 2) % 3;

if (memory[x][y] == 0) // if memory is empty, do the following, loop stucks here
values[x][y] = 'O';
memory[x][y] = 2;

printf("Opponent Moven");
printf("%s", values);

count++;

return 0;
else // if memory is not 0, do this. Error starts here
getchar();
printf("Move is %i", random);

opponent(values); // it calls itself to do a loop,




int main()
int input;
int i = 2;;

for (i = 2; i < 9; i++)
player(i, values); //Player goes first
getchar();
opponent(values);








c arrays for-loop if-statement






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 22:05









Jose Fernando Lopez Fernandez

555316




555316










asked Nov 9 at 21:06









Lactobacillus

62




62











  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Samuel Liew
    Nov 10 at 0:17
















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Samuel Liew
    Nov 10 at 0:17















Comments are not for extended discussion; this conversation has been moved to chat.
– Samuel Liew
Nov 10 at 0:17




Comments are not for extended discussion; this conversation has been moved to chat.
– Samuel Liew
Nov 10 at 0:17












1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Instead of having two independent values and memory, use an enum array to represent the game map.



enum Square VACANT, X, O squares[3][3], move = X;


It is initialised according to The initialization of static variables in C.



You probably need a function to decide if a player has won,



/* Checks if the player who's move it was won. */
static int is_win(void)


As well as a function for printing the board,



static const char letters = '/', 'X', 'O' ;

static void print_board(void)
printf("%c %c %cn%c %c %cn%c %c %cn",
letters[squares[0][0]], letters[squares[0][1]], letters[squares[0][2]],
letters[squares[1][0]], letters[squares[1][1]], letters[squares[1][2]],
letters[squares[2][0]], letters[squares[2][1]], letters[squares[2][2]]);



The code as you have it shadows the global state with parameters to the functions. This is very confusing. Think about whether you need the parameter to do the function's job. When one has complicated states that are defined in multiple files, it's probably best to have a agglomeration game object, but for simple games I think it's fine to have a global state.



Instead of playing until 7 moves, use a simple state machine to keep track of the game state. One can typedef the functions (How do function pointers in C work?) player and opponent and put them in a static array to simplify greatly the game loop. Consider,



/* Move returns whether we should continue. */
typedef int (*Move)(void);

/* Implements Move. */
static int player(void)
printf("player:n");
/* FIXME: player move. */
return is_win() ? 0 : (move = O, 1);


/* Implements Move. */
static int opponent(void)
printf("opp:n");
/* FIXME: Chose randomly from all of it's allowed moves? */
return is_win() ? 0 : (move = X, 1);


static const Move states = 0, &player, &opponent ;


Then your main is just,



int main(void) 
while(states[move]()) print_board();
printf("%c wins.n", letters[move]);
return 0;



Edit: Definitely have a state where it's a tie, perhaps when there are no moves left.






share|improve this answer






















  • Thank you very much. I'll learn this code as i haven't learn about enum and statics.
    – Lactobacillus
    Nov 10 at 5:24










  • One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
    – Neil Edelman
    Nov 11 at 20:30










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233270%2ftic-tac-toe-game-in-c-stuck-in-a-loop-when-finding-a-random-number-for-the-oppon%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










Instead of having two independent values and memory, use an enum array to represent the game map.



enum Square VACANT, X, O squares[3][3], move = X;


It is initialised according to The initialization of static variables in C.



You probably need a function to decide if a player has won,



/* Checks if the player who's move it was won. */
static int is_win(void)


As well as a function for printing the board,



static const char letters = '/', 'X', 'O' ;

static void print_board(void)
printf("%c %c %cn%c %c %cn%c %c %cn",
letters[squares[0][0]], letters[squares[0][1]], letters[squares[0][2]],
letters[squares[1][0]], letters[squares[1][1]], letters[squares[1][2]],
letters[squares[2][0]], letters[squares[2][1]], letters[squares[2][2]]);



The code as you have it shadows the global state with parameters to the functions. This is very confusing. Think about whether you need the parameter to do the function's job. When one has complicated states that are defined in multiple files, it's probably best to have a agglomeration game object, but for simple games I think it's fine to have a global state.



Instead of playing until 7 moves, use a simple state machine to keep track of the game state. One can typedef the functions (How do function pointers in C work?) player and opponent and put them in a static array to simplify greatly the game loop. Consider,



/* Move returns whether we should continue. */
typedef int (*Move)(void);

/* Implements Move. */
static int player(void)
printf("player:n");
/* FIXME: player move. */
return is_win() ? 0 : (move = O, 1);


/* Implements Move. */
static int opponent(void)
printf("opp:n");
/* FIXME: Chose randomly from all of it's allowed moves? */
return is_win() ? 0 : (move = X, 1);


static const Move states = 0, &player, &opponent ;


Then your main is just,



int main(void) 
while(states[move]()) print_board();
printf("%c wins.n", letters[move]);
return 0;



Edit: Definitely have a state where it's a tie, perhaps when there are no moves left.






share|improve this answer






















  • Thank you very much. I'll learn this code as i haven't learn about enum and statics.
    – Lactobacillus
    Nov 10 at 5:24










  • One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
    – Neil Edelman
    Nov 11 at 20:30














up vote
0
down vote



accepted










Instead of having two independent values and memory, use an enum array to represent the game map.



enum Square VACANT, X, O squares[3][3], move = X;


It is initialised according to The initialization of static variables in C.



You probably need a function to decide if a player has won,



/* Checks if the player who's move it was won. */
static int is_win(void)


As well as a function for printing the board,



static const char letters = '/', 'X', 'O' ;

static void print_board(void)
printf("%c %c %cn%c %c %cn%c %c %cn",
letters[squares[0][0]], letters[squares[0][1]], letters[squares[0][2]],
letters[squares[1][0]], letters[squares[1][1]], letters[squares[1][2]],
letters[squares[2][0]], letters[squares[2][1]], letters[squares[2][2]]);



The code as you have it shadows the global state with parameters to the functions. This is very confusing. Think about whether you need the parameter to do the function's job. When one has complicated states that are defined in multiple files, it's probably best to have a agglomeration game object, but for simple games I think it's fine to have a global state.



Instead of playing until 7 moves, use a simple state machine to keep track of the game state. One can typedef the functions (How do function pointers in C work?) player and opponent and put them in a static array to simplify greatly the game loop. Consider,



/* Move returns whether we should continue. */
typedef int (*Move)(void);

/* Implements Move. */
static int player(void)
printf("player:n");
/* FIXME: player move. */
return is_win() ? 0 : (move = O, 1);


/* Implements Move. */
static int opponent(void)
printf("opp:n");
/* FIXME: Chose randomly from all of it's allowed moves? */
return is_win() ? 0 : (move = X, 1);


static const Move states = 0, &player, &opponent ;


Then your main is just,



int main(void) 
while(states[move]()) print_board();
printf("%c wins.n", letters[move]);
return 0;



Edit: Definitely have a state where it's a tie, perhaps when there are no moves left.






share|improve this answer






















  • Thank you very much. I'll learn this code as i haven't learn about enum and statics.
    – Lactobacillus
    Nov 10 at 5:24










  • One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
    – Neil Edelman
    Nov 11 at 20:30












up vote
0
down vote



accepted







up vote
0
down vote



accepted






Instead of having two independent values and memory, use an enum array to represent the game map.



enum Square VACANT, X, O squares[3][3], move = X;


It is initialised according to The initialization of static variables in C.



You probably need a function to decide if a player has won,



/* Checks if the player who's move it was won. */
static int is_win(void)


As well as a function for printing the board,



static const char letters = '/', 'X', 'O' ;

static void print_board(void)
printf("%c %c %cn%c %c %cn%c %c %cn",
letters[squares[0][0]], letters[squares[0][1]], letters[squares[0][2]],
letters[squares[1][0]], letters[squares[1][1]], letters[squares[1][2]],
letters[squares[2][0]], letters[squares[2][1]], letters[squares[2][2]]);



The code as you have it shadows the global state with parameters to the functions. This is very confusing. Think about whether you need the parameter to do the function's job. When one has complicated states that are defined in multiple files, it's probably best to have a agglomeration game object, but for simple games I think it's fine to have a global state.



Instead of playing until 7 moves, use a simple state machine to keep track of the game state. One can typedef the functions (How do function pointers in C work?) player and opponent and put them in a static array to simplify greatly the game loop. Consider,



/* Move returns whether we should continue. */
typedef int (*Move)(void);

/* Implements Move. */
static int player(void)
printf("player:n");
/* FIXME: player move. */
return is_win() ? 0 : (move = O, 1);


/* Implements Move. */
static int opponent(void)
printf("opp:n");
/* FIXME: Chose randomly from all of it's allowed moves? */
return is_win() ? 0 : (move = X, 1);


static const Move states = 0, &player, &opponent ;


Then your main is just,



int main(void) 
while(states[move]()) print_board();
printf("%c wins.n", letters[move]);
return 0;



Edit: Definitely have a state where it's a tie, perhaps when there are no moves left.






share|improve this answer














Instead of having two independent values and memory, use an enum array to represent the game map.



enum Square VACANT, X, O squares[3][3], move = X;


It is initialised according to The initialization of static variables in C.



You probably need a function to decide if a player has won,



/* Checks if the player who's move it was won. */
static int is_win(void)


As well as a function for printing the board,



static const char letters = '/', 'X', 'O' ;

static void print_board(void)
printf("%c %c %cn%c %c %cn%c %c %cn",
letters[squares[0][0]], letters[squares[0][1]], letters[squares[0][2]],
letters[squares[1][0]], letters[squares[1][1]], letters[squares[1][2]],
letters[squares[2][0]], letters[squares[2][1]], letters[squares[2][2]]);



The code as you have it shadows the global state with parameters to the functions. This is very confusing. Think about whether you need the parameter to do the function's job. When one has complicated states that are defined in multiple files, it's probably best to have a agglomeration game object, but for simple games I think it's fine to have a global state.



Instead of playing until 7 moves, use a simple state machine to keep track of the game state. One can typedef the functions (How do function pointers in C work?) player and opponent and put them in a static array to simplify greatly the game loop. Consider,



/* Move returns whether we should continue. */
typedef int (*Move)(void);

/* Implements Move. */
static int player(void)
printf("player:n");
/* FIXME: player move. */
return is_win() ? 0 : (move = O, 1);


/* Implements Move. */
static int opponent(void)
printf("opp:n");
/* FIXME: Chose randomly from all of it's allowed moves? */
return is_win() ? 0 : (move = X, 1);


static const Move states = 0, &player, &opponent ;


Then your main is just,



int main(void) 
while(states[move]()) print_board();
printf("%c wins.n", letters[move]);
return 0;



Edit: Definitely have a state where it's a tie, perhaps when there are no moves left.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 10 at 2:28

























answered Nov 10 at 0:41









Neil Edelman

41228




41228











  • Thank you very much. I'll learn this code as i haven't learn about enum and statics.
    – Lactobacillus
    Nov 10 at 5:24










  • One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
    – Neil Edelman
    Nov 11 at 20:30
















  • Thank you very much. I'll learn this code as i haven't learn about enum and statics.
    – Lactobacillus
    Nov 10 at 5:24










  • One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
    – Neil Edelman
    Nov 11 at 20:30















Thank you very much. I'll learn this code as i haven't learn about enum and statics.
– Lactobacillus
Nov 10 at 5:24




Thank you very much. I'll learn this code as i haven't learn about enum and statics.
– Lactobacillus
Nov 10 at 5:24












One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
– Neil Edelman
Nov 11 at 20:30




One could skip defining static in this example and it would compile fine; apart from performance issues, it's use is self-documenting; static data and functions are not and cannot be called from other files, and it's use is associated with the file, (strictly, compilation unit); sort of private. stackoverflow.com/questions/572547/what-does-static-mean-in-c. enum: gnu.org/software/gnu-c-manual/gnu-c-manual.html#Enumerations.
– Neil Edelman
Nov 11 at 20:30

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233270%2ftic-tac-toe-game-in-c-stuck-in-a-loop-when-finding-a-random-number-for-the-oppon%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Darth Vader #20

How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

Ondo