-
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.
Merge pull request #17 from benpollarduk/updating-examine
Added ExaminationResult and ExaminationScene
- Loading branch information
Showing
14 changed files
with
79 additions
and
29 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
4 changes: 2 additions & 2 deletions
4
ktaf/src/main/kotlin/com/github/benpollarduk/ktaf/assets/Examination.kt
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.github.benpollarduk.ktaf.assets | ||
|
||
/** | ||
* Provides a lambda signature for a examining the [examinable] that must return a [ExaminationResult]. | ||
* Provides a lambda signature for handling an [examinationRequest] that must return a [ExaminationResult]. | ||
*/ | ||
public typealias Examination = (examinable: Examinable) -> ExaminationResult | ||
public typealias Examination = (examinationRequest: ExaminationRequest) -> ExaminationResult |
9 changes: 9 additions & 0 deletions
9
ktaf/src/main/kotlin/com/github/benpollarduk/ktaf/assets/ExaminationRequest.kt
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,9 @@ | ||
package com.github.benpollarduk.ktaf.assets | ||
|
||
/** | ||
* Represents a request to examine an [examinable] in a [scene]. | ||
*/ | ||
public data class ExaminationRequest( | ||
public val examinable: Examinable, | ||
public val scene: ExaminationScene | ||
) |
23 changes: 23 additions & 0 deletions
23
ktaf/src/main/kotlin/com/github/benpollarduk/ktaf/assets/ExaminationScene.kt
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 @@ | ||
package com.github.benpollarduk.ktaf.assets | ||
|
||
import com.github.benpollarduk.ktaf.assets.characters.Character | ||
import com.github.benpollarduk.ktaf.assets.characters.PlayableCharacter | ||
import com.github.benpollarduk.ktaf.assets.locations.Room | ||
|
||
/** | ||
* Represents a scene that an examination occurs in with a [examiner] and a [room]. | ||
*/ | ||
public data class ExaminationScene( | ||
val examiner: Character, | ||
val room: Room | ||
) { | ||
public companion object { | ||
/** | ||
* Provides a value representing no scene. | ||
*/ | ||
public val noScene: ExaminationScene = ExaminationScene( | ||
PlayableCharacter("", ""), | ||
Room("", "") | ||
) | ||
} | ||
} |
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
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