Please critique Brad's tic-tac-toe game!

Hi coders!

This is my tic-tac-toe game here : https://blbaylis.github.io/tic-tac-toe. I want to use this in my portfolio, so I tried to go the extra mile.

What do you like about it? What do you dislike about it? How could it be improved?

Any feedback is very welcome!

1 Like

First of all, it’s awesome that you can choose the colour and style of the player avatars. The game plays as it should; there doesn’t seem to be a problem with the game itself. So fantastic work on both those parts!

There appears to be a case where the avatars don’t work as they should. I did these steps from the start:

  • Select any of the crosses, any colour. Confirm selection. The red plain circle should be selected for the second player.
  • Hit back, then select any circle, any colour. Confirm selection. The red cross should now be selected for the second player.
  • However, it does not let me continue at this point, even though it looks like both players have a viable avatar.
  • It fixes if I actually select an avatar for the second player. I think that although it shows a selected avatar in the box, the game thinks no avatar has been selected which is why it doesn’t continue.

*Edit: Just as a feature request, maybe after restarting a game it could ask you if you’d like to go first or second?

1 Like

Ah yes, I see the problem, it took me a minute to get that! I’ll get that fixed, I suspect it won’t take very long. As for the restart option after each game, I thought that may be annoying for anyone who wanted to smash out some games quickly, but I’ll give it some thought.

Thank you very much for the feedback! If I could just ask you one more question…do you think the animation that plays upon selecting who goes first is successful in indicating the function of the button? I thought just having a button that says swap was a bit vague. Thanks again!

I’m definitely guilty of doing this on more than one project, I’ll get to cleaning up these monstrous looking bits of code looking better asap. Thanks for the advice on the assigning the elements a variable, I have wondered how much an element should be referenced before it becomes worthwhile to give them a variable and that is a definitive answer!

Thanks for the feedback!

No problem! Glad to help.

Regarding the swap function, I do think it was a little vague, but I can suggest two simple fixes to make it easier for the player to understand what it is without playing around with it too much.

  1. Have a “You” text above the icon that you’re playing as
  2. Maybe change “Swap” to “Swap Order”
1 Like

I like simple! Good ideas too, shouldn’t too hard to work in. Thanks for your time :slight_smile: