ちょー稼ぐ!!!
import scala.scalajs.js
import scala.scalajs.js.JSApp
import scala.scalajs.js.annotation.JSExport
@JSExport
object Main extends JSApp {
@JSExport
override def main(): Unit = {
import API._
start()
loop(() => work(), 1) // ちょー稼ぐ!
}
}
@js.native
object API extends js.GlobalScope {
def start(): Unit = js.native
def work(): Unit = js.native
def loop(f: js.Function0[Unit], msec: Int): Unit = js.native
def purchase(id: Int): Unit = js.native
def print(obj: Any): Unit = js.native
def cash: Long = js.native
def items: Long = js.native
def prices: Long = js.native
}