Tic Tac Toe
Tic Tac Toe adds a game card to Contact, Company, Deal, and Ticket records. Play against an AI opponent across three difficulty levels, build a score streak across games, and compete on a portal-wide leaderboard.
Features
Section titled “Features”- Player vs AI — you are X, the AI is O
- Three difficulty modes — Easy, Medium, and Hard
- Score streak system — score accumulates across games until you lose
- Portal-wide leaderboard — high scores, wins, losses, and draws per difficulty, persisted across sessions
Record types
Section titled “Record types”Appears on Contact, Company, Deal, and Ticket records.
Scoring
Section titled “Scoring”| Event | Points |
|---|---|
| Each token you place | +10 |
| Winning a game | +50 bonus |
| Drawing a game | No bonus — score carries forward |
| Losing a game | Score resets to 0 |
Your high score is the highest streak score you’ve reached before a loss. It is never reset.
Difficulty levels
Section titled “Difficulty levels”| Difficulty | AI behaviour |
|---|---|
| Easy | Moves randomly |
| Medium | Takes a winning move if available, blocks yours if not, otherwise random |
| Hard | Uses minimax — plays optimally and cannot be beaten |
Leaderboard
Section titled “Leaderboard”The leaderboard is stored in your portal’s encrypted config file (via @tradingcards-dev/config) and is shared across all users in the portal. It tracks each player separately by their HubSpot user account.
Scores are split by difficulty — tap Easy, Medium, or Hard in the leaderboard view to switch between boards. Each entry shows:
- Best — high score (highest streak before a loss)
- W / L / D — total wins, losses, and draws
Required HubSpot scopes
Section titled “Required HubSpot scopes”| Scope | Purpose |
|---|---|
crm.objects.contacts.read / write | Access contact records |
crm.objects.companies.read / write | Access company records |
crm.objects.deals.read / write | Access deal records |
tickets | Access ticket records |
files | Store the leaderboard config file |