-
1 Attachment(s)
Othello help
Hello I'm new to programming and I am working on an Othello game and I have issues creating the function to determine whether a entered move is valid or not. Can someone please help its urgent.
I have attached an incomplete code of what I have so far. Can someone please help?Attachment 15357
-
Why is your board 26x26 when the actual game board is 8x8 ?
You seem to be doing hacky things with the values of characters.
typeOfPlayer='W'-(21*i);
I've no idea what you're trying to do here.
checkLegalInDirection and checkLegality are a good start, but could probably do with some more splitting to reduce internal complexity.
> int row,col,temp;
> printf("Enter a move:\n");
> scanf(" %c%c%c",&typeOfPlayer,&row,&col);
Watch those scanf formats.
Use a compiler like gcc with the -Wall option to diagnose these before you run the code and wonder WTF is happening.