Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwapCups (Swift / SwiftUI)

macOS

Platforms tested: macOS. SwiftUI targets Apple platforms only, so this port isn't intended for Linux / FreeBSD / Windows.

A SwiftUI macOS version of the Swap Cups shell game. Three cups sit inverted on a table; one hides a blue ball. You hide the ball, run a sequence of swaps (A = left↔middle, B = middle↔right, C = left↔right), and find the ball afterward.

Features

  • Pick a cup to hide the ball — it lifts and the ball flashes 7× so you can memorize the start.
  • Each swap flashes green + blue dots over the two cups about to trade for ~1/3 second, then the cups slide past each other.
  • After the run, tap any cup to lift it and reveal the flashing ball (7×) or an empty cup.

Requirements

  • macOS with Xcode (SwiftUI).

Build & run

Open SwapCups.xcodeproj in Xcode and run the SwapCups scheme, or from the command line:

xcodebuild -project SwapCups.xcodeproj -scheme SwapCups -destination 'platform=macOS' build

Layout

SwapCups/
├── SwapCups/
│   ├── SwapCupsApp.swift   # @main App entry point
│   └── ContentView.swift   # game view, model, and animation
└── SwapCups.xcodeproj

Sibling ports

The same game in other stacks:

About

Swap the Cups shell game — SwiftUI/macOS

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages