Help with an algorithm to make an image change in an array of buttons

0

I have an array of buttons, ejm: [[B1, B2, B3], [B4, B5, B6], [B7, B8, B9]], this matrix was created with a function recursively, it already has an image assigned by the same function. Now, I have another matrix, but this is data, ejm: [[2, X, 1], [X, 2,1], [1,1,0]], I have another function that receives both matrices and what I want to change is the image of the button according to 'x' condition, ejm: if the position Data_Matrix [i] [j] == 2, then change the image and disable the button (disable it is easy, I have no problems) is that I always get out of range or the function gives me errors that I do not understand, I need someone who could help me in this problem please

    
asked by Keylor Martinez 21.10.2018 в 01:42
source

0 answers