Skip to content

HackYourFutureBelgium/backend-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game: Back End Assignment

Welcome to the Tic Tac Toe game assignment! This project is focused on developing a classic Tic Tac Toe game using vanilla JavaScript. The main goals are to build a functional game and emphasize best coding practices, including the use of plain JavaScript and the separation of concerns.

Table of Contents

  1. Game Overview
  2. Development Approach
  3. Testing
  4. Setup and Running
  5. Contributing
  6. Support

Game Overview

Introduction

Tic Tac Toe is a two-player game where each player takes turns marking a space in a 3x3 grid. The aim is to place three marks in a row, either horizontally, vertically, or diagonally.

Game Conditions

  • 3x3 grid.
  • Players use 'X' or 'O' marks.
  • Three marks in a line to win.
  • A draw if all squares are filled without a win.
  • Option to restart the game.

Development Approach

Importance of Vanilla JavaScript

Using plain JavaScript, without third-party libraries:

  • Enhances core JavaScript understanding.
  • Provides code control.
  • Minimizes dependencies.
  • Facilitates a fast-loading application.

Separation of Concerns

Ensuring code modularity:

  • Components: Isolated UI elements.
  • Logic: Specific functions for rules and behavior.
  • Styles: Separate visual styling.
  • Data Management: Separate game state and player information handling.

Testing

Ensuring code reliability:

Components Testing

  • Correct rendering.
  • Proper user interaction handling.

Utility Functions Testing

  • Expected output for given inputs.
  • Handling edge cases and unexpected inputs.
  • Proper interaction with other system parts.

Setup and Running

Set up

npm install

Running Tests

npm run test -- path-to-your-test

Running Format

npm run format

Contributing

Please adhere to the guidelines and test thoroughly to ensure compliance with game conditions and best practices.

Support

For questions or assistance, refer to the documentation.


Happy coding, and may the best Tic Tac Toe player win! Commit to core programming principles and clean code for professional development and growth as a skilled developer.