These are chat archives for sethtrain/marvin

May 2016
Doug Hurst
May 25 2016 00:10
you guys
i kind of want to marry type-checked RPG mechanics:
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_05).
Type in expressions for evaluation. Or try :help.

scala> import cats.syntax.all._
import cats.syntax.all._

scala> import

scala> import Metal.instances._
import Metal.instances._

scala> val sword = Metal.dull(3)
sword:[,] = Sword(Iron,Dull,3)

scala> val ingot = Metal.lead(4)
ingot:[] = Ingot(Lead,4)

scala> Transmutation.goldenTouch.transmute(ingot)
res0:[] = Ingot(Gold,4)

scala> Transmutation.goldenTouch.transmute[Sword[?, Edge]](sword)
res1:[,] = Sword(Gold,Dull,3)

scala> Bladesmithing.sharpen.smith[Sword[Metal, ?]](sword)
res2:[,] = Sword(Iron,Sharp,3)

scala> Bladesmithing.sharpen.smith[Sword[Metal, ?]](res1)
res3:[,] = Sword(Gold,Sharp,3)
i'll put up a repo in a sec
Seth Buntin
May 25 2016 00:57