none
RCV695 - Small Basic Tic Tac Toe advanced game example RRS feed

  • Question

  •  From the code example below

    If cells[0][0] = "O" And cells[1][1] = "O" And cells[2][2] = "" Then
        compCol = 2
        compRow = 2

    I do not understand how  the cells array gets associated with anything. In debug mode it never appears to be populated or associated with anything nor does it show up as an array.

    Could someone explain how this works? 

    Sunday, September 16, 2018 9:44 AM

Answers

  • The array is filled e.g. in line 292:  cells[r][c] = "O"

    or line 312        cells[r][c] = "X"


    Jan [ WhTurner ] The Netherlands

    • Proposed as answer by litdevModerator Monday, September 17, 2018 8:49 PM
    • Marked as answer by jswlhw Tuesday, September 18, 2018 8:48 PM
    Sunday, September 16, 2018 10:54 AM
    Answerer

All replies

  • The array is filled e.g. in line 292:  cells[r][c] = "O"

    or line 312        cells[r][c] = "X"


    Jan [ WhTurner ] The Netherlands

    • Proposed as answer by litdevModerator Monday, September 17, 2018 8:49 PM
    • Marked as answer by jswlhw Tuesday, September 18, 2018 8:48 PM
    Sunday, September 16, 2018 10:54 AM
    Answerer
  • Thanks. I saw that but it did not register as I thought it should have been registered during setup. Understand thanks top your answer it is a dynamic array that is only partially filled as marks are made.

    Still curious as why it doesn't show up as an array in either Debug or SB Prime debug. 


    Sunday, September 16, 2018 7:58 PM