Week 3 was our first project week. The task for each student was to develop their own tic-tac-toe game. It needed to have HTML, CSS and JS with jQuery. There was bonus points for developing a simple AI player and I was determined to get there.
Overall it was a fairly painless project, except for the CSS. You can see that I really was struggling with that in this project and I defaulted to just focus on the logic.
The AI was the most interesting challenge because it needed to know when the player had made its move and not make all its moves. It also needed to know what the board looked like as you are essentially teaching something about its world from scratch
I figured out that if you let the player first change the variable, which was essentially the 'state' of the game, it was a way to not let the AI run wild.
You can play it here if you like and the github is here too.
Overall it was a fairly painless project, except for the CSS. You can see that I really was struggling with that in this project and I defaulted to just focus on the logic.
The AI was the most interesting challenge because it needed to know when the player had made its move and not make all its moves. It also needed to know what the board looked like as you are essentially teaching something about its world from scratch
I figured out that if you let the player first change the variable, which was essentially the 'state' of the game, it was a way to not let the AI run wild.
You can play it here if you like and the github is here too.