Search:

Type: Posts; User: FrederikB

Search: Search took 0.10 seconds.

  1. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    I have it working now with this code:


    public boolean isWon(int token) {
    for (int i = 0; i < 3; i++)
    if ((gameBoard[i][0] == token) && (gameBoard[i][1] == token)
    && (gameBoard[i][2]...
  2. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    Okay! I got it all working now!
    So far so good, how will i now check for a winner? :o

    Updated first post with updated sourcecode
  3. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    Okay, now i have this :-)


    private void ClickField(int row, int field) {

    if (gameBoard[row][field] == 0) {
    theField[row][field].img.setImageDrawable(GetPlayer());...
  4. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    How would i create a gameBoard array with two []? (not sure what they are called.. :eek:)
  5. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    Please explain more :confused:

    - And with some code examples :-bd
  6. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    I changed my sourcecode, how would i now check for a winner?
  7. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    I have used arrays before, not just alot so you want me to do like this?:


    int[] gameBoard;
    gameBoard = new int[9];

    And then:

    gameBoard[0] = 1;
    To show that the field has been taken by...
  8. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    I am a little new to Java and haven't worked alot with arrays..
    Please explain more and show some code :-)
  9. Replies
    18
    Views
    1,467

    [SOLVED] Re: Tic Tac Toe - Checking for a winner

    I probably could, but i dont know how :o
  10. Replies
    18
    Views
    1,467

    [SOLVED] Tic Tac Toe - Checking for a winner

    Hello!

    I am currently developing a little Tic Tac Toe game in Java (For Android)
    And i am stuck, i want to "CheckForWinner();" but i can't really figure out how...

    I am thinking something...
Results 1 to 10 of 10