Skip to content

TomekLeszczynski/Odin-Project-Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Odin Project Tic Tac Toe Game

Tic Tac Toe game screen

General Info

Tic Tac Toe game project focused on Javascript Factory Functions, Module Pattern usage.

Features

Game logic built with Factory functions / Module Pattern.

  • UX:

    • Game for 2 players / no AI-opponent available.
    • Each player can add his name or play with default name: "player X" / "player Y".
    • Inputs are disabled when game is on.
    • Restart button available.
    • Marker shows which player's turn for the next move.

Technologies

Built with:

  • HTML,
  • CSS(Sass),
  • Vanilla JavaScript.

Inspiration & resources

The Odin Project project assignment: https://www.theodinproject.com/lessons/node-path-javascript-tic-tac-toe Design Patterns: https://www.patterns.dev/posts#design-patterns

Status

In progress.

Conclusion & Issues

The Module pattern and factory function require careful planning of the application's behavior and placing the "logic" in the right place. However, as a result, the code has a chance to remain organized, it is easier to work with, and allows for the use of "namespacing", which solves naming conflicts. Working with the Module pattern or factory requires getting used to it but pays off with better workflow.

Initially, I had trouble accessing certain data, such as inputs, to use them for displaying the names entered by players instead of default names. After all I wish to learn more about Module Patterns.