buondevid / tic-tac-toe

XOXO, but not hugs and kisses! Built with HTML, CSS and Javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic Tac Toe

XOXO, when it doesn't mean hugs and kisses

This app was created using only HTML, CSS and Vanilla JS.

This project is part of The Odin Project's curriculum, built to pratice what I've learnt.

It's a Tic Tac Toe game for 2 players or for 1 player VS the AI. To play against the computer you will have to write 'computer' in the second input field, as written in the instructions. It's fully responsive so that you can play on mobile too! N.B. AI just makes a random move, it's not a smart one.

πŸ”— Live preview: here

πŸ”— GitHub repo: here

Stack & Tools πŸ”¨

  • HTML
  • CSS
  • Vanilla JS
  • VS Code + ESLint + Node
  • Git & GitHub

What I learned πŸ“–

  • Made concrete us of Module revealing patterns and factory functions, as preferred over plain constructors.
  • Learned modular developing and to split everything into small problems/objects.
  • Improved DOM manipulation and usage of event listeners.
  • Learned how set and get methods work and the logic behind. Studied private and public methods.
    • Tested how important it is with IIFE (Immediately Invoked Functions Expressions).
  • Explored new CSS concepts like webpack, var() and attr().
    • Mastered animation and transitions with JS .classList manipulations.
  • Found a stable workaround for using viewport units on iOS, without disruptions.

What could be improved πŸ”

  • Study the minimax algorithm to make an unbeatable AI.
  • Better dividing of properties and methods between modules.

Author

πŸ—Ώ buondevid --> GitHub

About

XOXO, but not hugs and kisses! Built with HTML, CSS and Javascript.


Languages

Language:JavaScript 59.0%Language:CSS 28.6%Language:HTML 12.4%