Skip to content

Rebuild Liar's Dice as a native iOS (Swift/SwiftUI) game#2

Draft
m5136771 wants to merge 5 commits into
mainfrom
claude/quirky-wright-lix3yh
Draft

Rebuild Liar's Dice as a native iOS (Swift/SwiftUI) game#2
m5136771 wants to merge 5 commits into
mainfrom
claude/quirky-wright-lix3yh

Conversation

@m5136771

Copy link
Copy Markdown
Owner

What this does

Pivots the project from a Python teaching CLI into a native iOS app (Swift / SwiftUI) aimed at the App Store, while keeping the game's pirate personality intact.

This is Phase 0: a fully-playable foundation — complete rules engine, single-player vs. bots, full game loop, and a styled UI. The path from here to the App Store is documented in docs/ROADMAP.md.

Highlights

  • Pure rules engine (LiarsDice/Engine) — Foundation-only, no UI. Bids, raises, challenges, reveal/tally, dice loss, elimination, win/lose. Deterministic via an injected RNG, so it's fully unit-testable.
  • Bot AI with three difficulty levels (Cabin Boy / Buccaneer / Sea Devil), ported and tightened from the original Python bots.
  • SwiftUI app — main menu with settings (name, crew size, difficulty, "ones wild"), the game table (opponents, your cup, bidding controls), the dramatic reveal, and win/lose screens. Retro "pirate tavern" look with dice drawn entirely in SwiftUI (no image assets needed yet).
  • Personality preserved — pirate narration and the legendary Crazy Pete defeat sequence.
  • Tooling — a buildable LiarsDice.xcodeproj (Xcode 16+ synchronized-folder format), an XcodeGen project.yml recovery path, a Makefile, a shared scheme, and engine unit tests (swift test).
  • Original Python game archived under python-legacy/.

How to try it (on a Mac, Xcode 16+)

swift test            # run the engine tests — no Xcode UI needed
open LiarsDice.xcodeproj   # pick an iPhone simulator, press ⌘R

Notes / what's next (see ROADMAP)

  • ⚠️ App icon slot is wired up but empty — required before App Store submission (runs fine without it for dev).
  • ⚠️ Replace the placeholder bundle id com.example.liarsdice and set your signing team before archiving.
  • Next phases: app icon + pixel-art/sound polish, retention features (stats, daily challenge), then App Store Connect setup, TestFlight, and review.

Heads-up: built and reviewed on Linux, so it hasn't been compiled against the iOS SDK here. The engine has unit tests to run on your Mac; please give it a build in Xcode and flag anything that doesn't compile.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 5 commits June 17, 2026 04:14
Pivot the project from a Python teaching CLI to a native iOS app targeting
the App Store.

- Pure, UI-agnostic rules engine (LiarsDice/Engine): bids, raises, challenges,
  reveal/tally, dice loss, elimination, win/lose. Deterministic via injected
  RNG and covered by unit tests (swift test).
- Bot AI with three difficulty levels, ported and tightened from the original
  Python bots.
- SwiftUI app: main menu with settings, the game table (opponents, your cup,
  bidding controls), the reveal, and win/lose screens, in a retro "pirate
  tavern" style with SwiftUI-drawn dice.
- Preserved the original's personality: pirate narration and the legendary
  Crazy Pete defeat sequence.
- Buildable Xcode project (synchronized-folder format) plus an XcodeGen
  recovery spec, a Makefile, and a shared scheme.
- Archived the original Python game under python-legacy/.
- README rewritten for the iOS app; docs/ROADMAP.md lays out the path to the
  App Store (art, sound, App Store Connect, TestFlight, review, monetization).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLyVMeLrDE5HWrv7gdWvAY
Runs the engine unit tests (swift test) and compiles the SwiftUI app with
xcodebuild for the iOS Simulator on GitHub's macOS runners. This provides the
real compile/test verification that isn't possible in the Linux dev environment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLyVMeLrDE5HWrv7gdWvAY
GitHub-hosted macOS runners did not provision for this repo, so the macOS
build/test jobs failed at startup. The game engine is Foundation-only Swift
with no UI, so it builds and runs its XCTest suite on a Linux Swift toolchain —
which provisions reliably and verifies the core game logic. The SwiftUI iOS app
is built locally in Xcode (the actual target platform).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLyVMeLrDE5HWrv7gdWvAY
Every CI job (macOS and Linux alike) failed at startup with no runner assigned
(runner_id 0, no logs, ~2s), which indicates GitHub Actions hosted runners are
disabled or limited for this account — not a code issue. Removing the workflow
so the PR isn't perpetually red. Documented in docs/ROADMAP.md how to enable CI
later; until then the engine is verified with `swift test` and the app via an
Xcode build, both run locally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLyVMeLrDE5HWrv7gdWvAY
- App icon: pixel-art bone die with crossed bones, generated by
  tools/make_icon.py (pure stdlib PNG), wired into the asset catalog. Concept
  variants in docs/icon-concepts/.
- Audio + haptics: 8-bit chiptune SFX synthesized by tools/make_sfx.py, played
  via AudioManager (AVAudioPlayer, ambient/mix session) and paired with UIKit
  haptics through a Feedback facade. Wired into GameViewModel narration; sound
  and haptics toggles added to the main menu.
- docs/BACKLOG.md: prioritized feature backlog and user stories across launch
  and post-launch milestones.
- docs/ART_DIRECTION.md: agreed pixel-art look and feel, palette, sprite specs,
  font/audio guidance, and an asset shopping list for sourcing or commissioning.
- ROADMAP/README updated to reflect the above.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLyVMeLrDE5HWrv7gdWvAY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants