-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #314 from realpython/tic-tac-toe-ai-python
Tic tac toe ai python
- Loading branch information
Showing
83 changed files
with
17 additions
and
146 deletions.
There are no files selected for viewing
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
tic-tac-toe-ai-python/source_code_bonus/tic-tac-toe/frontends/browser/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .cli import main | ||
|
||
main() |
2 changes: 0 additions & 2 deletions
2
...ource_code_final/frontends/browser/cli.py → ...onus/tic-tac-toe/frontends/browser/cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/browser/cli.py | ||
|
||
import http.server | ||
import socketserver | ||
import threading | ||
|
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...e_code_final/frontends/browser/players.py → .../tic-tac-toe/frontends/browser/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/browser/players.py | ||
|
||
from asyncio import Queue | ||
|
||
from tic_tac_toe.game.players_async import AsyncPlayer | ||
|
2 changes: 0 additions & 2 deletions
2
...code_final/frontends/browser/renderers.py → ...ic-tac-toe/frontends/browser/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ce_code_final/frontends/browser/script.py → ...s/tic-tac-toe/frontends/browser/script.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/browser/script.py | ||
|
||
from asyncio.queues import Queue | ||
|
||
from js import document | ||
|
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
tic-tac-toe-ai-python/source_code_bonus/tic-tac-toe/frontends/console/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .cli import main | ||
|
||
main() |
2 changes: 0 additions & 2 deletions
2
...urce_code_final/frontends/console/args.py → ...nus/tic-tac-toe/frontends/console/args.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/args.py | ||
|
||
import argparse | ||
from typing import NamedTuple | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...ource_code_final/frontends/console/cli.py → ...onus/tic-tac-toe/frontends/console/cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/cli.py | ||
|
||
from tic_tac_toe.game.engine import TicTacToe | ||
|
||
from .args import parse_args | ||
|
2 changes: 0 additions & 2 deletions
2
...e_code_final/frontends/console/players.py → .../tic-tac-toe/frontends/console/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/players.py | ||
|
||
import re | ||
|
||
from tic_tac_toe.game.players import Player | ||
|
2 changes: 0 additions & 2 deletions
2
...ic-tac-toe/frontends/console/renderers.py → ...ic-tac-toe/frontends/console/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/renderers.py | ||
|
||
import textwrap | ||
from typing import Iterable | ||
|
||
|
7 changes: 2 additions & 5 deletions
7
...code_step_4/tic-tac-toe/frontends/play.py → ..._code_bonus/tic-tac-toe/frontends/play.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
tic-tac-toe-ai-python/source_code_bonus/tic-tac-toe/frontends/window/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .cli import main | ||
|
||
main() |
2 changes: 0 additions & 2 deletions
2
...source_code_final/frontends/window/cli.py → ...bonus/tic-tac-toe/frontends/window/cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/window/cli.py | ||
|
||
from queue import Queue | ||
from threading import Thread | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...ce_code_final/frontends/window/players.py → ...s/tic-tac-toe/frontends/window/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/window/players.py | ||
|
||
from queue import Queue | ||
|
||
from tic_tac_toe.game.players import Player | ||
|
2 changes: 0 additions & 2 deletions
2
..._code_final/frontends/window/renderers.py → ...tic-tac-toe/frontends/window/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/window/renderers.py | ||
|
||
import tkinter as tk | ||
from queue import Queue | ||
from tkinter import ttk | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...al/library/src/tic_tac_toe/game/engine.py → ...oe/library/src/tic_tac_toe/game/engine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/engine.py | ||
|
||
from dataclasses import dataclass | ||
from typing import Callable, TypeAlias | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...rary/src/tic_tac_toe/game/engine_async.py → ...rary/src/tic_tac_toe/game/engine_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...l/library/src/tic_tac_toe/game/players.py → ...e/library/src/tic_tac_toe/game/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/players.py | ||
|
||
import abc | ||
import time | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...ary/src/tic_tac_toe/game/players_async.py → ...ary/src/tic_tac_toe/game/players_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/players_async.py | ||
|
||
import abc | ||
import asyncio | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...library/src/tic_tac_toe/game/renderers.py → ...library/src/tic_tac_toe/game/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/renderers.py | ||
|
||
import abc | ||
|
||
from tic_tac_toe.logic.models import GameState | ||
|
File renamed without changes.
3 changes: 0 additions & 3 deletions
3
...brary/src/tic_tac_toe/logic/exceptions.py → ...brary/src/tic_tac_toe/logic/exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
.../library/src/tic_tac_toe/logic/minimax.py → .../library/src/tic_tac_toe/logic/minimax.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/minimax.py | ||
|
||
import json | ||
from functools import cache, partial | ||
from importlib import resources | ||
|
2 changes: 0 additions & 2 deletions
2
...e/library/src/tic_tac_toe/logic/models.py → ...e/library/src/tic_tac_toe/logic/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/models.py | ||
|
||
import enum | ||
import random | ||
import re | ||
|
2 changes: 0 additions & 2 deletions
2
...brary/src/tic_tac_toe/logic/validators.py → ...brary/src/tic_tac_toe/logic/validators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/validators.py | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
5 changes: 0 additions & 5 deletions
5
tic-tac-toe-ai-python/source_code_final/frontends/browser/__main__.py
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tic-tac-toe-ai-python/source_code_final/frontends/console/__main__.py
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tic-tac-toe-ai-python/source_code_final/frontends/window/__main__.py
This file was deleted.
Oops, something went wrong.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
tic-tac-toe-ai-python/source_code_final/tic-tac-toe/frontends/console/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .cli import main | ||
|
||
main() |
2 changes: 0 additions & 2 deletions
2
...p_4/tic-tac-toe/frontends/console/args.py → ...nal/tic-tac-toe/frontends/console/args.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/args.py | ||
|
||
import argparse | ||
from typing import NamedTuple | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...ep_4/tic-tac-toe/frontends/console/cli.py → ...inal/tic-tac-toe/frontends/console/cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/cli.py | ||
|
||
from tic_tac_toe.game.engine import TicTacToe | ||
|
||
from .args import parse_args | ||
|
2 changes: 0 additions & 2 deletions
2
.../tic-tac-toe/frontends/console/players.py → .../tic-tac-toe/frontends/console/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/players.py | ||
|
||
import re | ||
|
||
from tic_tac_toe.game.players import Player | ||
|
2 changes: 0 additions & 2 deletions
2
...code_final/frontends/console/renderers.py → ...ic-tac-toe/frontends/console/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/renderers.py | ||
|
||
import textwrap | ||
from typing import Iterable | ||
|
||
|
7 changes: 3 additions & 4 deletions
7
...ython/source_code_final/frontends/play.py → ..._code_final/tic-tac-toe/frontends/play.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...step_4/tic-tac-toe/library/pyproject.toml → ..._final/tic-tac-toe/library/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# pyproject.toml | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...oe/library/src/tic_tac_toe/game/engine.py → ...oe/library/src/tic_tac_toe/game/engine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/engine.py | ||
|
||
from dataclasses import dataclass | ||
from typing import Callable, TypeAlias | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...e/library/src/tic_tac_toe/game/players.py → ...e/library/src/tic_tac_toe/game/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/players.py | ||
|
||
import abc | ||
import time | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
...library/src/tic_tac_toe/game/renderers.py → ...library/src/tic_tac_toe/game/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/renderers.py | ||
|
||
import abc | ||
|
||
from tic_tac_toe.logic.models import GameState | ||
|
File renamed without changes.
3 changes: 0 additions & 3 deletions
3
...brary/src/tic_tac_toe/logic/exceptions.py → ...brary/src/tic_tac_toe/logic/exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
.../library/src/tic_tac_toe/logic/minimax.py → .../library/src/tic_tac_toe/logic/minimax.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...l/library/src/tic_tac_toe/logic/models.py → ...e/library/src/tic_tac_toe/logic/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/models.py | ||
|
||
import enum | ||
import random | ||
import re | ||
|
2 changes: 0 additions & 2 deletions
2
...brary/src/tic_tac_toe/logic/validators.py → ...brary/src/tic_tac_toe/logic/validators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/validators.py | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_1/tic-tac-toe/library/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# pyproject.toml | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
3 changes: 0 additions & 3 deletions
3
...-toe-ai-python/source_code_step_1/tic-tac-toe/library/src/tic_tac_toe/logic/exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_1/tic-tac-toe/library/src/tic_tac_toe/logic/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/models.py | ||
|
||
import enum | ||
import re | ||
from dataclasses import dataclass | ||
|
2 changes: 0 additions & 2 deletions
2
...-toe-ai-python/source_code_step_1/tic-tac-toe/library/src/tic_tac_toe/logic/validators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/validators.py | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_2/tic-tac-toe/library/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# pyproject.toml | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_2/tic-tac-toe/library/src/tic_tac_toe/game/engine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/engine.py | ||
|
||
from dataclasses import dataclass | ||
from typing import Callable, TypeAlias | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_2/tic-tac-toe/library/src/tic_tac_toe/game/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/players.py | ||
|
||
import abc | ||
import random | ||
import time | ||
|
2 changes: 0 additions & 2 deletions
2
...ac-toe-ai-python/source_code_step_2/tic-tac-toe/library/src/tic_tac_toe/game/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/renderers.py | ||
|
||
import abc | ||
|
||
from tic_tac_toe.logic.models import GameState | ||
|
3 changes: 0 additions & 3 deletions
3
...-toe-ai-python/source_code_step_2/tic-tac-toe/library/src/tic_tac_toe/logic/exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_2/tic-tac-toe/library/src/tic_tac_toe/logic/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/models.py | ||
|
||
import enum | ||
import re | ||
from dataclasses import dataclass | ||
|
2 changes: 0 additions & 2 deletions
2
...-toe-ai-python/source_code_step_2/tic-tac-toe/library/src/tic_tac_toe/logic/validators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/validators.py | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/frontends/console/__main__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/__main__.py | ||
|
||
from .cli import main | ||
|
||
main() |
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/frontends/console/args.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/args.py | ||
|
||
import argparse | ||
from typing import NamedTuple | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/frontends/console/cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/cli.py | ||
|
||
from tic_tac_toe.game.engine import TicTacToe | ||
|
||
from .args import parse_args | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/frontends/console/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/players.py | ||
|
||
import re | ||
|
||
from tic_tac_toe.game.players import Player | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/frontends/console/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# frontends/console/renderers.py | ||
|
||
import textwrap | ||
from typing import Iterable | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/frontends/play.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/library/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# pyproject.toml | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/library/src/tic_tac_toe/game/engine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/engine.py | ||
|
||
from dataclasses import dataclass | ||
from typing import Callable, TypeAlias | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/library/src/tic_tac_toe/game/players.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/players.py | ||
|
||
import abc | ||
import random | ||
import time | ||
|
2 changes: 0 additions & 2 deletions
2
...ac-toe-ai-python/source_code_step_3/tic-tac-toe/library/src/tic_tac_toe/game/renderers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/game/renderers.py | ||
|
||
import abc | ||
|
||
from tic_tac_toe.logic.models import GameState | ||
|
3 changes: 0 additions & 3 deletions
3
...-toe-ai-python/source_code_step_3/tic-tac-toe/library/src/tic_tac_toe/logic/exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tic-tac-toe-ai-python/source_code_step_3/tic-tac-toe/library/src/tic_tac_toe/logic/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# tic_tac_toe/logic/models.py | ||
|
||
import enum | ||
import re | ||
from dataclasses import dataclass | ||
|
Oops, something went wrong.