-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Classroom, Exercise, Lesson, Grade init
- Loading branch information
Showing
11 changed files
with
90 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
BibleCore/Sources/Classroom/Lesson/Excercise/Exercise.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import BibleCore | ||
import ComposableArchitecture | ||
|
||
struct Exercise: Reducer { | ||
enum State: Equatable, Codable { | ||
case buildByWord(BuildByWord.State) | ||
case buildByLetter(BuildByLetter.State) | ||
} | ||
|
||
enum Action: Equatable { | ||
case buildByWord(BuildByWord.Action) | ||
case buildByLetter(BuildByLetter.Action) | ||
} | ||
|
||
var body: some ReducerOf<Self> { | ||
Scope(state: /State.buildByWord, action: /Action.buildByWord) { | ||
BuildByWord() | ||
} | ||
Scope(state: /State.buildByLetter, action: /Action.buildByLetter) { | ||
BuildByLetter() | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import ComposableArchitecture | ||
|
||
struct Grade: Reducer { | ||
enum State: Equatable, Codable { | ||
case disabled | ||
case ready | ||
case failed(String) | ||
case partial(String) | ||
case correct | ||
} | ||
|
||
enum Action: Equatable { | ||
case submit | ||
} | ||
|
||
var body: some ReducerOf<Self> { | ||
Reduce { state, action in | ||
switch action { | ||
case .submit: | ||
return .none | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters