Access an array, from different class. How?
posted 5 years ago
With the given code- really difficult to tell the reason for the Nullpointer Exception. But either board is NULL or board.getPocketArray(0, 0) is null. You would have to check that. Also check if the instances being referred in the if condition of the legalMove method are not null.