How marzan3015/tictactoe works
This repository contains two independent Tic-Tac-Toe games: a terminal game where a human plays against a rule-based computer, and a graphical two-player game. The terminal workflow accepts and validates a human move, chooses a computer move, checks outcomes, and prints the board. The GUI workflow handles mouse and keyboard events, updates the board, checks for wins or ties, and redraws the game. Both implementations are concentrated in single files; the README provides no additional capability details.
Main entry points: main.py Terminal Game Loop · TicTacToe.py GUI Event Loop
Components 12
Terminal Game
- Terminal Game Loop
Tictactoe-in-powershell-Using-Minmax/main.py - Move Handling
Tictactoe-in-powershell-Using-Minmax/main.py - Computer Strategy
Tictactoe-in-powershell-Using-Minmax/main.py - Board Rules
Tictactoe-in-powershell-Using-Minmax/main.py - Board Display
Tictactoe-in-powershell-Using-Minmax/main.py
Graphical Game
- GUI Event Loop
tictactoe_version01/TicTacToe.py - Board State
tictactoe_version01/TicTacToe.py - Win Detection
tictactoe_version01/TicTacToe.py - Board Rendering
tictactoe_version01/TicTacToe.py - Restart Handling
tictactoe_version01/TicTacToe.py
Other components
- Human Player
- Local Players
Connections 13
- Human Player → Terminal Game Loop: enters moves
Tictactoe-in-powershell-Using-Minmax/main.py - Terminal Game Loop → Move Handling: requests move
Tictactoe-in-powershell-Using-Minmax/main.py - Terminal Game Loop → Computer Strategy: requests move
Tictactoe-in-powershell-Using-Minmax/main.py - Terminal Game Loop → Board Rules: checks outcome
Tictactoe-in-powershell-Using-Minmax/main.py - Terminal Game Loop → Board Display: prints board
Tictactoe-in-powershell-Using-Minmax/main.py - Move Handling → Board Rules: checks and marks
Tictactoe-in-powershell-Using-Minmax/main.py - Computer Strategy → Board Rules: tests candidates
Tictactoe-in-powershell-Using-Minmax/main.py - Local Players → GUI Event Loop: sends input
tictactoe_version01/TicTacToe.py - GUI Event Loop → Board State: updates squares
tictactoe_version01/TicTacToe.py - GUI Event Loop → Win Detection: checks win
tictactoe_version01/TicTacToe.py - GUI Event Loop → Board Rendering: draws board
tictactoe_version01/TicTacToe.py - GUI Event Loop → Restart Handling: handles restart
tictactoe_version01/TicTacToe.py - Win Detection → Board Rendering: draws win line
tictactoe_version01/TicTacToe.py