From 628d7f14a6004a1518c5e501bbd0c1985662606a Mon Sep 17 00:00:00 2001 From: Kevin Figueroa Date: Fri, 20 Feb 2026 12:18:07 -0500 Subject: [PATCH] Add color constants to runner.py Reorganize project structure by creating game package Move tictactoe.py into game/ directory Update import in runner.py to use game.tictactoe module --- tictactoe/game/__init__.py | 0 tictactoe/{ => game}/tictactoe.py | 0 tictactoe/runner.py | 6 ++++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 tictactoe/game/__init__.py rename tictactoe/{ => game}/tictactoe.py (100%) diff --git a/tictactoe/game/__init__.py b/tictactoe/game/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tictactoe/tictactoe.py b/tictactoe/game/tictactoe.py similarity index 100% rename from tictactoe/tictactoe.py rename to tictactoe/game/tictactoe.py diff --git a/tictactoe/runner.py b/tictactoe/runner.py index 01437bf..772d74d 100644 --- a/tictactoe/runner.py +++ b/tictactoe/runner.py @@ -2,7 +2,7 @@ import sys import time -import tictactoe as ttt +import game.tictactoe as ttt # Initialize pygame pygame.init() @@ -13,6 +13,8 @@ # Colors red = (255, 0, 0) blue = (0, 0, 255) +black = (0, 0, 0) +white = (255, 255, 255) # Create the game window screen = pygame.display.set_mode(size) @@ -42,7 +44,7 @@ # Draw title title = largeFont.render("Play Tic-Tac-Toe", True, white) titleRect = title.get_rect() - titleRect.center = ((width / 2), 50) + titleRect.center = (int(width / 2), 50) screen.blit(title, titleRect) # Draw "Play as X" button