Skip to content

NHaisler/WebDesign-Project1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe — Nicholas Haisler

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.

Play

Open index.html (landing page) and click Play Game to go to game.html.

Features implemented

  • 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.

"Learn Something New" feature

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).

AI Usage Documentation

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?".

AI Reflection

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors