Payas Web Kit · Card Game

Payas Omi

The classic Sri Lankan trick-taking card game, playable in your browser. Face three AI opponents across a 32-card deck, with three difficulty levels and session auto-save.

id::payas-omi · stable
KitPayas Web Kit
Players4 (1 human + 3 AI)
Deck32 cards · A K Q J 10 9 8 7
Tricks8 per round
AI difficultyEasy · Medium · Hard
SavelocalStorage + .md export
LicenseMIT
Players
4
1 human + 3 AI bots
Deck
32 cards
A K Q J 10 9 8 7 per suit
AI levels
3
Easy · Medium · Hard
Win target
5/10/15
Tokens — configurable
features

What Payas Omi does

Authentic Omi rules
Four players, two partnerships (Us vs Them). Trump Maker names the suit after seeing the first 4 cards. Follow-suit rules enforced. Kapothi (8–0 sweep) awards double tokens.
Three AI difficulty levels
Easy plays randomly. Medium plays the highest non-trump on lead, and tries to win tricks or conserve cards when following. Hard adds aggressive trump-leading strategy.
Save & resume
Auto-saves after every round to localStorage. Manual export as a human-readable .md file. Import a save file to resume from any previous state.
Fully responsive
4-position grid table layout with breakpoints for tablet (900 px), mobile (640 px), small phone (420 px), and landscape orientation.
Round history
Full scrollable history table after each round — trump suit, maker, tricks won per team, tokens earned, Kapothi or Ambaya flags, running totals.
Fullscreen & themes
Enter fullscreen with F11. Toggle light/dark mode with Ctrl+T. Start a new game with Ctrl+N. All persisted across sessions.
game rules · quick reference

How Omi is scored

TeamsUs (South + North) vs Them (West + East) — 2 partnerships of 2
Deck32 cards — A K Q J 10 9 8 7 in each of 4 suits (2–6 removed)
TrumpNamed by the Trump Maker (player to dealer's right) after seeing first 4 cards
Tricks per round8 — each player plays one card per trick, clockwise
Follow-suit ruleMust follow the led suit if you hold one; only play another suit if you can't follow
5–7 tricks won1 token to the winning team
All 8 tricks (Kapothi)2 tokens to the winning team
4–4 drawNo tokens — next round's winner earns a bonus token
AmbayaTrump Maker's team fails to win 5+ tricks — opponents get the token; flagged in history
Win conditionFirst team to reach the token target (5, 10, or 15 — configurable)
technical · details

Technical details

Entry pointpayas-omi.html — single HTML file, no build required
StackHTML5 · CSS3 · Vanilla JavaScript ES2022
DependenciesBootstrap 5.3 · Font Awesome 6.5 · Google Fonts
StoragelocalStorage — auto-save after each round, settings persist
Save formatHuman-readable Markdown with YAML front-matter (payas-omi-save-round{N}.md)
AI timing800 ms first move, 700 ms + random 0–400 ms subsequent — simulates thinking
DeveloperSaman Wijesinghe
LicenseMIT