A simple and interactive "Would You Rather" game built with SwiftUI, featuring dynamic question loading from a local JSON file, clean UI design, and basic game logic. This was my first full Swift app and a fun intro to iOS development!
- π§ Dynamic Questions β Questions are loaded from a
questions.jsonfile using Swift'sCodablesystem. - π¨ Clean, Responsive UI β Full-screen layout with distinct color-coded options.
- π Looping Questions β Cycles through an array of questions; wraps around when finished.
- βοΈ Modular Code Structure β Logic and UI are cleanly separated across files.
- π§ͺ Console Feedback β Prints the selected option for testing/debugging.
- Language: Swift 5
- UI Framework: SwiftUI
- Data Handling: JSON +
Codable
| Question View |
|---|
![]() |
WouldYouRatherGame/ βββ ContentView.swift // Main UI and game logic βββ QuestionS.swift // Defines the Question model βββ LoadQuestion.swift // Loads JSON data βββ questions.json // Local question dataset
