Skip to content

Commit

Permalink
Refactor: Replaced subclasses of MenuScene with factory methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Martomate committed Apr 22, 2024
1 parent 6f9ba6c commit ee62aa8
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 152 deletions.
8 changes: 0 additions & 8 deletions common/src/main/scala/hexacraft/util/events.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package hexacraft.util

import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.reflect.ClassTag

trait Tracker[E] {
def notify(event: E): Unit
Expand Down Expand Up @@ -86,11 +85,4 @@ object Channel {
tx.rx = rx
(tx, rx)
}

inline def wrap[E] = [T] =>
(wrapFn: Sender[E] => T) => {
val (tx, rx) = Channel[E]()
val value = wrapFn(tx)
(value, rx)
}
}
Loading

0 comments on commit ee62aa8

Please sign in to comment.