Rather, I would assume that what is happening is that you are trying
to take an arrarylist, and index it like:

a[row][col]

It doesn't work like that.

This isn't c.

Instead, you have to do sometihng like

a[row*num_columns + col] = num

when you assign to it.

kris

On Fri, Mar 23, 2012 at 2:08 PM, a1 <[email protected]> wrote:
>
>> Thanks for pointing that out for me.
>
> This is wrong of course: r.nextInt(0) will throw IllegalArgumentException.
>
> First of all try to remove try/catch block - you are suppressing all errors
> that way and none of the function that you are calling inside it should
> throw. My guess is that you are getting ArrayIndexOutOfBounds due to
> incorrect indexing here:
>
> cards[i%COL_COUNT][i/COL_COUNT]=t%(size/2);
>
> but since I don't know how cards is allocated and what you are trying to
> achieve that's just a guess.
>
> --
> Bart
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to