Checker board[Solved]


I’m trying to make a game of checkers for a practice project, but am having a bit of troubles. I want to make the game automatically place all of the pieces on running it, but am not really sure how to do it. I was wondering about using an 8x8 matrix using 0 for no piece, 1 for a red piece, and 2 for a black piece and have it run through that and place the peces, but I don’t know if that would work. Could someone help me with this?


Edit: Well actually I guess it would be a list of lists, but still the same idea as a matrix.

Try that. It should work. I don’t think there is any obvious better way to do it.

Ok so I have a list of lists made up, but is there a way I could make it so that each number is assigned a position in 3d space? So then I could run through the lists and make it add pieces accordingly.

Edit: Nevermind I finally got it.