Skip to content

abraxasw/Dice-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dice Timer

A SwiftUI iOS app for tracking and timing dice-rolling game rounds across multiple teams.

Overview

Dice Timer helps coordinate multiplayer dice games by precisely tracking when each team completes their rolls. Perfect for competitive dice games where timing matters!

Features

  • Multi-Team Support: Add unlimited teams with custom names and player counts
  • Precise Timing: 10ms precision timer to accurately track game rounds
  • Round Tracking: Record when each team rolls their first and last dice
  • Statistics: View detailed performance metrics including:
    • Average completion times per team
    • Average time per player
    • Round-by-round comparisons
    • Standard deviation calculations
    • Fastest round identification
  • Multiple Reset Options:
    • Reset current round only
    • Reset all rounds (keep teams)
    • Reset everything (clear all data)
  • Progress Monitoring: Visual progress indicator showing teams completed vs total
  • Auto-Complete Detection: Timer automatically stops when all teams finish

Requirements

  • iOS 17.0+
  • Xcode 15.0+
  • Swift 5.9+

Installation

  1. Clone the repository:
git clone https://github.com/abraxasw/Dice-Game.git
cd "Dice Game"
  1. Open the project in Xcode:
open "Dice Game.xcodeproj"
  1. Build and run the project (⌘+R)

Usage

  1. Add Teams: Tap the '+' button to add teams with names and player counts
  2. Start Timer: Press the green play button to begin timing
  3. Record Times:
    • Tap the blue '1' button when a team rolls their first dice
    • Tap the green checkmark when they roll their last dice
  4. View Results: Check team statistics and round comparisons
  5. Next Round: When ready, advance to the next round
  6. Reset: Choose from three reset options via the reset button

Project Structure

Dice Game/
├── Models/
│   ├── Team.swift              # Team data model with round tracking
│   └── GameTimer.swift         # Timer logic and state management
├── Views/
│   ├── AddTeamView.swift       # Add new team interface
│   └── ResultsView.swift       # Statistics and results display
├── ContentView.swift           # Main game interface
└── Dice_GameApp.swift          # App entry point

Architecture

  • SwiftUI: Declarative UI framework
  • MVVM Pattern: Models manage data, Views display UI
  • Combine: Reactive timer updates via @Published properties
  • State Management: @StateObject, @State, and @Binding for data flow

See CLAUDE.md for detailed architecture documentation.

Development

Build and test commands:

# Build from command line
xcodebuild -project "Dice Game.xcodeproj" -scheme "Dice Game" -configuration Debug build

# Run tests
xcodebuild test -project "Dice Game.xcodeproj" -scheme "Dice Game" -destination 'platform=iOS Simulator,name=iPhone 15'

License

This project is available for personal and educational use.

Author

Andrew Tam

Contributing

This is a personal project, but suggestions and feedback are welcome via issues.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages