Skip to content
Open to SDE roles · full-time and internships +91 90504 57303
Work/05
2026 · SwiftUI, coursework base plus my own features

CodeBreaker

A native Mastermind game for iPhone, built in SwiftUI. It started from a course assignment, and I added more than 20 colour and emoji themes, with zero dependencies.

SwiftSwiftUIiOS20+ themesNo dependencies
20+colour and emoji themes
0third-party dependencies
704lines of Swift
iOSnative SwiftUI app
  • Game rules live in plain Swift model types with no UI inside them; SwiftUI views only render state.
  • Pegs can be colours or emoji across 20+ themes, and the whole board restyles instantly.
  • Started from a course assignment and extended with my own features; a word-based sibling, CodeWordBreaker, checks guesses against a dictionary.
How it works

The story, in chapters.

Chapter 1

A clean model

The game logic lives in plain Swift types (a code, a guess and the match rules) with no UI inside. The views just render state.

Chapter 2

Themes everywhere

Pegs can be colours or emoji, across 20+ themes, and the whole board restyles instantly.

Chapter 3

Play a quick round

The web version below uses the same rules. The real app is native SwiftUI.

Its sibling, CodeWordBreaker, swaps pegs for real English words.

Try it

Run it yourself.

Play · the same rules as the SwiftUI app
The real program, recorded.The real program. Scroll to play it, scroll back to rewind.
Next project
CodeWordBreaker
Keep going
CV Contact