pull help message from readme
This commit is contained in:
parent
ad29f04660
commit
0ea49d3534
22
ui.nim
22
ui.nim
@ -2,22 +2,12 @@ import os, math, strutils, strformat
|
|||||||
import fixedseq, game, simulation
|
import fixedseq, game, simulation
|
||||||
|
|
||||||
|
|
||||||
const help =
|
const help = block:
|
||||||
"""cup - Probability calculator for the board game CamelUp
|
# can't use regex, fortunately we are looking for a straightforward separator
|
||||||
|
let readme = slurp("./README.md")
|
||||||
Usage:
|
let endPos = rfind(readme, "```") - 1
|
||||||
cup [-i] SPACE:STACK [...SPACE:STACK] [DICE]
|
let startPos = rfind(readme, "```", last = endPos) + 4
|
||||||
|
readme[startPos..endPos]
|
||||||
SPACE refers to a numbered board space (1-16).
|
|
||||||
STACK refers to a stack of camel colors from bottom to top, e.g.
|
|
||||||
YBR (Yellow, Blue, Red, with Red on top).
|
|
||||||
DICE refers to the set of dice that have already been rolled,
|
|
||||||
e.g. GPR (Green, Purple, Red)
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-i Interactive mode (currently unimplemented)
|
|
||||||
-h Show this message and exit
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
# =============================
|
# =============================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user