the problem seems to be around line 25, the board prints
out nine 0's and then an eight in the square you move to, however it always leaves an eight in board[0] always, if you could please help me remove this, using djgpp on win98, thanks in advance.
#include <stdio.h>
int board[9] = {8} ...
here is the complete code if you can help
#include <stdio.h>
int a[9] , square_place = 0, win = 0;
void board_display( int x0y0[] );
int place_it( void );
int check_nought( int place, int a_1[] );
int check_cross( int place, int a_1[] );
int check_win( int a_1[], int wins );
main()
{
while...
this may take a few moments but it is appreciated....
as astart to a game of noughts and crosses i am using djgpp on win 98, place takes values 1-9, a_1[9] takes values 0-8 as can be seen from the code. board display(a) is just a printf function for a_1[9] to print either 1's,5's or...
using djgpp on win 98, hid_places_f2[0] = 1, hid_places_f2[1] = 2, this always prints the message at the end, even if y is equal to -1,and i don't want it to, think i amde an error, if you could help out please.
int y = 0;
y = hid_places_f2[0] - hid_places_f2[1];
if ( (y % 3) != 0 || y != 1 ||...
Could you please help with this, a while loop that doesnt
step out of the loop, how do i do what i intended that is
if a number other than 1-3 is inputed continue with the loop
i am using djgpp on windows 98.
while ( (place_f < 0) || (place_f >3 ) ) /* place_f is */
{...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.