aboutsummaryrefslogtreecommitdiff
path: root/internal/game/render_craps_paytable.go
blob: 5acf92ae0aba32dcd5c6aea15f3a1cc8bab01dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package game

// Keep each outcome beside its payout instead of packing a series of
// total:odds pairs into a sentence. One blank felt row sits below the
// command summary.
func renderSimplifiedCrapsFelt(mode string, unicode bool) string {
	c := newCrapsCanvas(9)
	for _, x := range []int{0, 38} {
		c.box(x, 0, x+38, 2)
		c.box(x, 2, x+38, 8)
	}
	c.center(1, 37, 1, "DICE TOTAL", crapsGold)
	c.center(39, 75, 1, "PAYOUT", crapsGold)
	rows := [][2]string{
		{"2", "3:1"},
		{"3 or 4", "1:1"},
		{"10 or 11", "2:1"},
		{"12", "5:1"},
		{"5, 6, 7, 8 or 9", "LOSE STAKE"},
	}
	for i, row := range rows {
		c.center(1, 37, i+3, row[0], crapsInk)
		c.center(39, 75, i+3, row[1], crapsInk)
	}
	return c.render(mode, unicode)
}