Tic-Tac-Toe: The goal is to implement a basic tic-tac-toe game. We will build it in the terminal using Node. The game will support 2 players, X and O, that make alternating moves. You're free to google anything you want! Develop this like you would work on any other project but please work on it indepdently. This project is tough! It's meant to be hard and to stretch your skills.
-
Use ES6 classes to create a board class. The class should be able to store a 3x3 grid of tic-tac-toe pieces.
-
Add a method to the class to print the board to the terminal (
console.log
) The format is up to you, but it should be clear to the user which pieces are where. Here's a possibility:
X|-|O