Simple browser Tic Tac Toe where you play O and an AI plays X. This repo includes a landing page, the game, sound effects, and responsive styling.
Open index.html (landing page) and click Play Game to go to game.html.
- Core game mechanics: place O, AI places X (simple three-step AI).
- Clear game-over conditions: win / lose / draw.
- Responsive layout (desktop + mobile).
- Sound: looping background music, click SFX, win/lose SFX.
- Landing page with description and GitHub link.
Sound effects & background music:
I added background music and per-move SFX so players get audio feedback.
Files in /sounds/ (background.mp3, click.wav, win.wav, lose.wav).
Music auto-plays on first user interaction (mobile browsers typically block auto-play).
ChatGPT was used to quickly retrieve answers for lots of basics. Such as simple CSS or JS functions or formatting. One example being, "How do I auto-loop the background music?".
If used wrong, it could do the whole project for me but I would not learn anything. That is why I aim to ask it simple questions to guide me along for different sections I wish to complete. In doing so, I feel I gained a lot more from this project than I would have otherwise. It would go overboard on certain problems though, like when working on the AI, it tried to suggest doing an entire mini-max for different depths. I decided to just use a simple idea of checking for immediate wins or loses, otherwise randomly move. It isn't the best solution in terms of having the best AI, but it makes it more fun since the user can actually win. This is why it is too good sometimes.