Skip to content

Salma-Mamdoh/tic-tac-toe-game-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

Introduction

Welcome to the Tic-Tac-Toe repository! This repository contains implementations of Tic-Tac-Toe games in C++, Python, and Java. In addition to the traditional Tic-Tac-Toe game, this repository also includes an implementation of a Tic-Tac-Toe game with numbers, where players take turns writing numbers on a 3x3 board and the winner is the first person to complete a line that adds up to 15.

Python Implementation

The Python implementation of Tic-Tac-Toe with numbers is a developed version of the traditional Tic-Tac-Toe game. The game consists of a board of 3x3, and player 1 takes odd numbers (1,3, 5, 7, 9) while player 2 takes even numbers (0, 2, 4, 6, 8). Players take turns writing their numbers, and each player can use each number only once. The first person to complete a line that adds up to 15 is the winner.

Java Implementation

The Java implementation of Tic-Tac-Toe is a generic game that includes a board, players, and a game manager. The game manager is responsible for managing the flow of the game, while the board is responsible for keeping track of the state of the game. The players are represented by a base class, XoPlayer, which is inherited by the Player class that represents the players in the Tic-Tac-Toe game. The game manager, XOGameManager, is responsible for managing the flow of the game and determining the winner.

C++ Implementation

The C++ implementation of Tic-Tac-Toe is also an object-oriented implementation, with the game being divided into classes for the board, players, and game manager. The board class is responsible for keeping track of the state of the game, while the player class represents the players in the game. The game manager class, XOGameManager, is responsible for managing the flow of the game and determining the winner.

Conclusion

Whether you're a beginner or an experienced programmer, the Tic-Tac-Toe repository has something for you. You can explore the code and experiment with the different implementations to deepen your understanding of the game and improve your programming skills. We encourage you to test the code thoroughly and to share any feedback or suggestions you may have.

About

Implementation of XO Game in Python , Java and C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published