I’m starting to make a checkers game and I’ve got all my graphics plus the board drawn.
Before I moved on to creating the pieces I was wondering what an easy way to tackle the logic side of the movement of pieces.. Should I make a table of every square, detecting if it has a piece and if so, what color? (i.e 0=empty, 1=red, 2=black) or do you guys have a better idea to this issue?
I’m starting to make a checkers game and I’ve got all my graphics plus
Share
By using OOP principles I would go with something like:
A more naive approach could use a simple map:
That can be use to avoid storing the current position of a piece inside itself.