tictactoe-abhay
Installation
pip install tictactoe-abhay
Example
from tic_tac_toe.TicTacToe import TicTacToe
game = TicTacToe("player 1", "player 2")
game.play_turn(5)
print(game.get_board())
>>>|1|2|3|
-------
|4|x|6|
-------
|7|8|9|
Methods and Attributes
Attributes
player_1:str name of player 1 (Default "player_1")
player_2:str name of player 2 (Default "player_2")
winner:str name of player if winner (Default "")
player_1_turn:bool priorty bit to keep track of player order(Init true)
board:list stores the state of the board
Methods
get_winner()
get the name of the winner
get_board()
return a str state of the board
play_turn(spot:int)
updates the board based on the spot and return status
status(int):
+1 : game has ended
+0 : successful in placing the spot
-1 : filled spot was selected
Metadata
Release files for tictactoe-abhay 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tictactoe-abhay-0.0.7.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tictactoe_abhay-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / tictactoe-abhay-0.0.7.tar.gz
| Download URL | tictactoe-abhay-0.0.7.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a66c1c190102d97b430c45457b4dfe977db0fca86f7f6ea65622baa338b38cb1
|
|
BLAKE2b-256 checksum How to use checksums |
6b48d7d34b0b1a9afb6b2ed08ec10a2970a4f8b2628a00766f7a48fb76e48993
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
|
Release files / tictactoe_abhay-0.0.7-py3-none-any.whl
| Download URL | tictactoe_abhay-0.0.7-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15961950d1b40ae903f2875528c98dd4035ecd556832479407496cefb7bc55e7
|
|
BLAKE2b-256 checksum How to use checksums |
edfc1a834c82e3a87cdb8c391bb1ae916b40c9d2f9278aa4a5a68202277837ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
|