Skip to content

Commit

Permalink
TerminalClones have toSceneUpdateFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Nov 14, 2023
1 parent 3e55ccb commit 2563825
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions demo/src/main/scala/demo/RogueTerminalEmulatorScene.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,4 @@ object RogueTerminalEmulatorScene extends Scene[Unit, Unit, Unit]:
Graphic(10, 10, TerminalMaterial(Assets.tileMap, fg, bg))
}

Outcome(
SceneUpdateFragment(tiles.clones)
.addCloneBlanks(tiles.blanks)
)
Outcome(tiles.toSceneUpdateFragment)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ final case class TerminalClones(blanks: Batch[CloneBlank], clones: Batch[CloneTi
def combine(other: TerminalClones): TerminalClones =
TerminalClones(blanks ++ other.blanks, clones ++ other.clones)

def toSceneUpdateFragment: SceneUpdateFragment =
SceneUpdateFragment(clones).addCloneBlanks(blanks)

object TerminalClones:
def empty: TerminalClones =
TerminalClones(Batch.empty, Batch.empty)

0 comments on commit 2563825

Please sign in to comment.