summaryrefslogtreecommitdiff
path: root/public/docs/module.html
diff options
context:
space:
mode:
Diffstat (limited to 'public/docs/module.html')
-rw-r--r--public/docs/module.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/public/docs/module.html b/public/docs/module.html
index d392b3e..c75020f 100644
--- a/public/docs/module.html
+++ b/public/docs/module.html
@@ -67,7 +67,8 @@ The game landing page on the server has a bit of text introducing the game, and
<p>Put the about text in the about.html file.
-<xmp><p>
+<xmp>
+<p>
Dolorum fugiat dolor temporibus. Debitis ea non illo sed debitis cupiditate
ipsum illo. Eos eos molestias illo quisquam dicta.
@@ -87,7 +88,8 @@ However, if your game uses custom options these need to be added as form fields.
<p>
Add a create.html file to inject form fields into the create game page.
-<xmp><p>
+<xmp>
+<p>
Player count:
<br>
<select name="players">
@@ -113,7 +115,8 @@ Client HTML
<p>
The game needs a play.html file using the following template:
-<xmp><!doctype html>
+<xmp>
+<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover">
@@ -268,6 +271,9 @@ Either a list of roles, or a function returning a list of roles.
Create the initial game object with a random number seed, scenario, and options object.
<p>
+The "setup" function takes three parameters provided by the server: the random seed (generated by the server when starting the game), the scenario (a string with the scenario name) and options (a plain javascript object with key/value pairs for the options chosen by the user when creating the game).
+
+<p>
The options object is filled in with values from the create.html form fields.
<h3> exports.view = function (game, player) </h3>