Comic project - tic-tac-toe, written in python.
Allows you to play a game of tic-tac-toe with a real opponent on the same host.
The players themselves determine the size of the field and the number of cells for winning.
TicTacToe(a, b, player1, player2, countOfCellForWin)
- constructor for creating a TicTacToe object
a :Int - field width (1..26)
b :Int - field height (1..26)
player1 :Player - first player
player2 :Player - second player
countOfCellForWin :Int - number of cells to win (Default: 3)
Player(name)
- constructor for creating a Player object
name :String - player name
TicTacToeObj.game()
- launches the game
from tic_tac_toe import Player
from tic_tac_toe import TicTacToe
# Launch of the classic 3x3 TicTacToe
gameObj = TicTacToe(3, 3, Player('Ivan'), Player('Alex'), 3)
gameObj.game()
- The program does not use third-party libraries
- A console game