Home

Projects

About


Tic-Tac-Toe

A two-player game on a 3x3 grid

My Role(s)

Software Developer

External Links

GitHub Repository


Introduction

This C++ program allows two people to play Tic-Tac-Toe with one another. They each enter their names as either player 1 (X) or player 2 (O). Player 1 goes first and picks a cell to mark. If they type in an invalid cell, then the turn automatically switches without updating the board. The program alternates between the players until either the same symbol appears three times in a row or if there is no more turns available (total: 9). The program will also let the users know how they won (horizonal, vertical, or diagonal). It will specify which row the player won if it's horizontal/vertical or which diagonal the player won.


Demo

Here's a video that shows this code in action! The code for this is also in my GitHub.



Aditi Kisara