voyageur-review/game/begin.coffee
Alexander Yakovlev 5e7f4087aa Salet is now passed as an argument.
Also, no frequency filters on choice list.
2016-02-01 14:22:23 +07:00

40 lines
1.3 KiB
CoffeeScript

markdown = require('../../lib/markdown.coffee')
room = require("../../lib/room.coffee")
obj = require('../../lib/obj.coffee')
dialogue = require('../../lib/dialogue.coffee')
oneOf = require('../../lib/oneOf.coffee')
Salet = require('../../lib/salet.coffee')
salet = new Salet
salet.view.init(salet)
salet.game_id = "your-game-id-here"
salet.game_version = "1.0"
$(document).ready(() ->
salet.beginGame()
)
###
Element helpers. There is no real need to build monsters like a().id("hello")
because you won't use them as is. It does not make sense in context, the
author has Markdown and all utilities to *forget* about the markup.
###
way_to = (content, ref) ->
return "<a href='#{ref}' class='way'>#{content}</a>"
textlink = (content, ref) ->
return "<a href='./_writer_#{ref}' class='once'>#{content}</a>"
actlink = (content, ref) ->
return "<a href='./#{ref}' class='once'>#{content}</a>"
textcycle = (content, ref) ->
return "<a href='./_replacer_#{ref}' class='cycle' id='#{ref}'>#{content}</a>"
# TODO: hide this somewhere in exports or autoreplacer shortcuts
cyclelink = (content) ->
return "<a href='./_replacer_cyclewriter' class='cycle' id='cyclewriter'>#{content}</a>"
# The first room of the game.
# For accessibility reasons the text is provided in HTML, not here.
room "start", salet,
dsc: """
""",
choices: "#start"