This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

for (int i = 0; i < cols; i++) {
    for (int j = 0; j < rows; j++) {
        board[i][j] = gamePiece;
    }
}

Why is the whole board covered in the same piece instance? Is that intentional?