I haven’t been as active here as I want, but I am still moving forward. The holidays are a great excuse for not getting things done, right? I’ll be brief, because we all have New Year’s parties to attend, I’m sure!
I updated the look of the checkers a little, using nothing more than a border-radius in the css. I also implemented a way to stack the checkers, or rather, to indicate that they are stacked, again, in the css. For now a green ring around the checker means there are two stacked and a red ring means three are stacked. There are two green ringed tokens in the image to the right.
I changed the move count to two, allowing each side to move twice before the turn changes. In the future I will check for doubles and make that four moves, as well as adding a way to end the turn if there are no more valid moves available. I’m still taking player input via the text box, but pretty soon I think I will get away from that in favor of mouse/touch interaction.
For the curious, here is my modified findLowest function. This is what allows the checkers to stack. I feel like it has gotten a little unwieldy, but for now I am weighting my desire to finish the game over my desire for clean code.
Happy New Year everyone!