diff options
author | Mark Powers <markppowers0@gmail.com> | 2020-05-13 10:53:44 -0500 |
---|---|---|
committer | Mark Powers <markppowers0@gmail.com> | 2020-05-13 10:53:44 -0500 |
commit | 1855e0c673b06399ca89aa0c705d30b1a9ea3b97 (patch) | |
tree | 2c78eceab67bc2f377449a25df7f87181876070b /src/sim/static/items.js | |
parent | a5706caa9cd91e357085d77c62aff7107ac76fc1 (diff) |
Add sim and paperflight games
Diffstat (limited to 'src/sim/static/items.js')
-rw-r--r-- | src/sim/static/items.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sim/static/items.js b/src/sim/static/items.js new file mode 100644 index 0000000..40f73f1 --- /dev/null +++ b/src/sim/static/items.js @@ -0,0 +1,21 @@ +tileMap = { + 0: Mountain, + 1: Forest, + 2: Town, +} + +function getScout() { + return { + id: 1, + text: "scout", + cost: 2, + callback: function () { + var type = tileMap[Math.floor(Math.random() * 3)] + var tile = new type() + status = `Your scout found a ${tile.name}. Click to place it.` + return { + tile: tile + } + } + } +}
\ No newline at end of file |