Skip to content

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.

  • 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

Appears on Contact, Company, Deal, and Ticket records.

EventPoints
Each token you place+10
Winning a game+50 bonus
Drawing a gameNo bonus — score carries forward
Losing a gameScore resets to 0

Your high score is the highest streak score you’ve reached before a loss. It is never reset.

DifficultyAI behaviour
EasyMoves randomly
MediumTakes a winning move if available, blocks yours if not, otherwise random
HardUses minimax — plays optimally and cannot be beaten

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
ScopePurpose
crm.objects.contacts.read / writeAccess contact records
crm.objects.companies.read / writeAccess company records
crm.objects.deals.read / writeAccess deal records
ticketsAccess ticket records
filesStore the leaderboard config file