Tic Tac Toe
Script for Adobe Illustrator
ㅤ
Description
This Adobe Illustrator script brings the classic Tic Tac Toe game directly into your design workspace. It's a fully-featured game that allows you to play against an intelligent AI opponent with multiple difficulty levels and board sizes. The script creates a persistent palette window that stays open while you work, making it perfect for quick gaming breaks during your design sessions.
ㅤ
Key Features
- Multiple Board Sizes: Choose from 3×3 (classic), 5×5, or 7×7 grids.
- Variable Win Conditions: 3-in-a-row for 3×3 boards, 4-in-a-row for larger boards.
- Three AI Difficulty Levels: Easy, Medium, and Hard.
- Score Tracking: Keeps track of wins, losses, and ties across multiple games.
- Persistent Window: Stays open as a dockable palette in Illustrator.
ㅤ
Installation
1. Download the Tic Tac Toe.jsx script file.
2. Place the script in your Adobe Illustrator Scripts folder:
⮑ Mac: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
2. Restart Adobe Illustrator if it was already running.
ㅤ
Run the Script
- Open Adobe Illustrator.
- Go to File → Scripts → Tic Tac Toe.
- The game window will appear as a dockable palette.
ㅤ

ㅤ
How to Play
ㅤ
➊ Choose Your Game Mode
- Use the Game Mode dropdown to select your preferred board size:
- 3×3 (3 in a row): Classic tic-tac-toe.
- 5×5 (4 in a row): Larger board, need 4 in a row to win.
- 7×7 (4 in a row): Biggest board, still need 4 in a row to win.
ㅤ
➋ Select AI Difficulty
Choose from three difficulty levels:
- Easy: AI makes random moves 70% of the time, optimal moves 30% of the time.
- Medium: AI makes optimal moves 70% of the time, random moves 30% of the time.
- Hard: AI always makes the optimal move using advanced algorithms.
ㅤ
➌ Make Your Move
- You always play as ❌ and go first.
- Click any empty square on the board to place your mark.
- The AI will automatically make its move as ⭕ after you.
ㅤ
➍ Win Conditions
- 3×3 board: Get 3 of your marks in a row (horizontal, vertical, or diagonal).
- 5×5 and 7×7 boards: Get 4 of your marks in a row.
- If the board fills up with no winner, it's a tie.
ㅤ
➎ Game Controls
- New Game: Start a fresh game with the same settings.
- Reset Score: Clear all win/loss/tie statistics.
- The game automatically tracks your performance in the Score panel.
ㅤ
☻ Score Panel
- ❌: Your wins (playing as X).
- ⭕: AI wins (playing as O).
- Ties: Games that ended in a draw.
ㅤ
Enjoy your Tic Tac Toe gaming sessions right within Adobe Illustrator!
ㅤ
ㅤ