Skip to content

kbelltree/odin-tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

odin-tic-tac-toe

Odin Project: Tic Tac Toe



Summary

In this project, I used JavaScript, CSS, and HTML to construct a desktop-browser-based Tic-Tac-Toe game. The goal was to demonstrate what I had previously learned of JavaScript Factory Function, IIFE Module, Scope, and Closure. Details on the project are available here.

Project Instructions:

  1. Initiate a game board using an array.

  2. Store players within objects.

  3. Use modules/factory functions for code encapsulation.

  4. Integrate code logically.

  5. Render X and O from game board to HTML.

  6. Include a function to determine game status (winner or tie).

  7. Implement start/reset button, player name input, and winner notification spot.

    Optional (Not implemented): Create an AI for random moves, and then make it unbeatable.

I've employed a combination of newly acquired and foundational skills throughout this project. Here's a breakdown:

Problem Solving
  • Recognizing problems
  • Strategic planning
  • Employing a divide and conquer approach
Error Correction
  • Utilizing Chrome Developer Tools
  • Conducting web searches for solutions
Clean Code Writing
  • Maintaining consistent indentation
  • Adopting descriptive and consistent naming conventions
  • Adhering to principles like YAGNI, DRY, and KISS
HTML
  • Crafting a basic form inside a modal
  • Implementing client-side form validations
CSS
  • (New) Employing calc()
  • (New) Implementing max()
  • (New) Styling SVGs to fit within grid cells
  • Designing layouts using both Grid and Flexbox
  • Applying a CSS reset
  • Integrating custom fonts
  • Experimenting with font-related properties
  • Implementing parent-child combinators
  • Employing pseudo selectors
  • Utilizing attribute selectors
  • Prioritizing relative units
  • Defining and using custom properties
  • Building modals
Javascript
  • (New) Implementing Factory Functions
  • (New) Leveraging IIFE Modals
  • (New) Differentiating between e.currentTarget and e.target
  • (New) Prototyping in the console first
  • Implementing e.preventDefault()
  • Making use of the ternary operator
  • Utilizing objects
  • Distinguishing between function declarations and expressions
  • Grasping core concepts such as variables, numbers, operators, and various data types
  • Understanding conditionals, methods, loops, and functions
DOM Manipulation
  • (New) Implementing dataset
  • (New) Transferring data from HTML input to display
  • Making use of template literals for DOM access
  • Utilizing classList.add
  • Modifying styles and HTML content
  • Incorporating event listeners
Emmet
  • Using abbreviations for HTML coding
  • Employing shortcut keys
SVG
  • Incorporating SVG imagery

Resources Used

Referenced Tutorials

Javascript related:

CSS related: