Search:

Type: Posts; User: rmatze

Search: Search took 0.01 seconds.

  1. int checkWinner(cell) { //Do all your checks...

    int checkWinner(cell)
    {
    //Do all your checks
    //if you found out someone won,
    //check if that cell is an 'x' or an 'o'
    //if it's an 'x' return 1
    //if it's an 'o' return 2
    //if no one won,...
  2. get rid of that return 'x'; return 'o'; That...

    get rid of that return 'x'; return 'o'; That doesn't make any sense.
  3. yes, now dont return a char. return an int...

    yes, now dont return a char. return an int telling if someone won. Try returning a 0 is no one has one yet, return a 1 if the user won or return a 2 if the computer won.
  4. This part has some issues... Use curly...

    This part has some issues...

    Use curly brackets for every if statement. Right now this is giving you what you think it should. I can't even indent it for you because it won't make sense.

    ...
  5. You're missing the point. You won't need to end...

    You're missing the point. You won't need to end the game if you can even play it.

    Here is a little more help, it's your code just modified a bit.


    #include <stdio.h>
    #include <stdlib.h>
    ...
  6. That code will not compile. You need to write a...

    That code will not compile. You need to write a few lines then compile and test, you are doing too much at one time.

    Let's give you a little more direction. I've removed a lot of your code to...
Results 1 to 6 of 6