Skip to content

babanin/factor-blitz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Factor Blitz

Factor Blitz is a SwiftUI iOS app for practicing multiplication factors. It turns each product into a quick multiple-choice round where players identify the factor pair or pairs that create that product.

The app is built for short practice sessions, progressive learning, and local score tracking. It runs fully on-device and stores profile, leaderboard, language, and learning progress data in UserDefaults.

Features

  • Progressive learning path from easier tables through full-table review.
  • Practice modes for the full multiplication table, diagonal squares, and a selected times table from 1 through 10.
  • Product-based questions that can require multiple correct factor pairs, such as 16 = 2 x 8 and 16 = 4 x 4.
  • Per-player local leaderboards, ranked by accuracy, elapsed time, wrong answers, and completion date.
  • Star-based learning progress; three-star completion unlocks the next learning level.
  • Result review with accuracy, time, wrong-answer count, and product-level performance.
  • Localized UI with system language support plus English, Russian, Uzbek Latin, and Ukrainian.
  • Haptic feedback for correct and wrong answers.

Requirements

  • Xcode with Swift 6 support.
  • iOS 17.0 or later simulator/device target.

Project Structure

  • FactorBlitz/FactorBlitzApp.swift: app entry point.
  • FactorBlitz/Views: SwiftUI screens and reusable view styles.
  • FactorBlitz/ViewModels: game round state, timer, answer feedback, and result creation.
  • FactorBlitz/Models: modes, learning levels, multiplication pairs, session/result models, localization helpers, and player data.
  • FactorBlitz/Game: question generation, persistence stores, haptics, and time formatting.
  • FactorBlitz/Localizable.xcstrings: localized strings.
  • FactorBlitzTests: XCTest coverage for game rules, persistence, localization, and formatting.

Build

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

xcodebuild -project FactorBlitz.xcodeproj \
  -scheme FactorBlitz \
  -destination 'generic/platform=iOS Simulator' \
  -derivedDataPath .build/DerivedData \
  build

Test

Run tests from Xcode with the FactorBlitz scheme, or use xcodebuild with an installed simulator:

xcodebuild test -project FactorBlitz.xcodeproj \
  -scheme FactorBlitz \
  -destination 'platform=iOS Simulator,name=iPhone 15' \
  -derivedDataPath .build/DerivedData

If the named simulator is not installed, replace iPhone 15 with a simulator listed by your local Xcode installation.

Implementation Notes

  • QuestionGenerator creates unique unordered multiplication pairs for the selected mode and groups questions by product.
  • GameSession tracks round progress, correct selections, wrong answers, per-product timing, and final scoring.
  • LeaderboardStore and LearningProgressStore use injected UserDefaults, which keeps persistence logic testable.
  • Learning level IDs and GameMode.id values are persisted keys; keep them stable.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages