Game
Thirteen — Vietnam's national card game
A mobile take on Tiến Lên, Vietnam's national card game, with single-player AI matches and online multiplayer wrapped in an intuitive UI.

View larger

View larger

View larger
Overview
A mobile reimagining of Tiến Lên, Vietnam's national card game. The country's most popular card game, rebuilt with an interface clear enough for players anywhere to pick up.
Key features
- Single-player AI: matches against AI opponents at a range of difficulties
- Multiplayer: real-time online play for four, built on Photon
- Faithful rules: straights, pairs, bombs and every other Tiến Lên combination
- Intuitive UI: card selection, passing and play animations
Technical challenges
The AI uses Minimax-based hand optimisation, and Photon PUN2 handles real-time turn synchronisation. Supabase stores match statistics and leaderboard data.
// Validating a play
public bool IsValidPlay(List<Card> cards, List<Card> prevPlay) {
var combo = ComboDetector.Detect(cards);
if (combo == ComboType.None) return false;
if (prevPlay.Count == 0) return true;
return ComboComparer.IsBigger(cards, prevPlay);
}
Rules
- A special ranking that runs 3 → A → 2
- Pairs, triples and four-of-a-kind (bombs) can be played as combinations
- Straights (runs of consecutive ranks) are supported
- A 2 is the strongest single card and can only be beaten by a four-card set
Project details
Category
Game
Completed
February 10, 2025
Reading time
1 min read
Tech stack
UnityC#PhotonSupabase