Skip to content
← Back to projects

Mahjong App

Vibe coded a Mahjong game with tile rendering, scoring, and multiplayer — built for fun.

Tweakerclaude-codenext-js

What I Built

A web-based Mahjong game with proper tile rendering, hand evaluation, scoring, and game flow. Built it because I wanted to play Mahjong with friends online without downloading an app.

Tools Used

  • -Claude Code — Game logic, tile rendering, scoring engine
  • -Next.js — Frontend framework
  • -Canvas/SVG — Tile rendering

How I Vibe Coded It

Mahjong has complex rules — 136 tiles, dozens of winning patterns, scoring that varies by region. Instead of learning game dev from scratch, I described the rules to Claude Code and let it implement the logic.

The key was being very specific about which ruleset I wanted (Japanese Riichi Mahjong). Claude Code handled the tile management, hand evaluation, and scoring — things that would have taken weeks to implement manually.

Key Lessons

  • -Complex logic is where AI coding shines. Game rules are perfect for vibe coding — you describe the rules, AI implements them.
  • -Be specific about variants. "Build Mahjong" is too vague. "Build Japanese Riichi Mahjong with tsumo/ron scoring" gets you what you want.
  • -Test by playing. The best QA for a game is actually playing it. Found most bugs by playing, not by reading code.