package wow.doge.mygame.utils

import monix.execution.atomic.AtomicAny

/**
  * Useless
  */
sealed abstract class Tree[+T]
case class Node[T](data: T, children: AtomicAny[LazyList[Tree[T]]])
    extends Tree[T] {
  def add(data: T) = {
    children.transform(children =>
      Node(data, AtomicAny(LazyList[Tree[T]]())) #:: children
    )
  }
}
// case object Leaf extends Tree[Nothing]
case class Data(data: Int)

class TreeManager[T] {
//   val root: AtomicAny[Tree[T]] = AtomicAny(Leaf)

  def add(data: T, node: Node[T]) = {}
}
