~eliasnaur/gio-example

ref: be4210bc9c13a956ada2498e62a31e2eb836e6aa gio-example/gio-extras/outlay/fan/cribbage/cmd/crib.go -rw-r--r-- 354 bytes
be4210bcChris Waldon gio-extras/outlay/{fan,grid}: add outlay examples 9 months ago
                                                                                
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
package main

import (
	"fmt"

	"gioui.org/example/gio-extras/outlay/fan/cribbage"
)

func main() {
	g := cribbage.NewGame(2)
	fmt.Println(g)
	g.DealRound()
	fmt.Println(g)
	g.Sacrifice(0, 0)
	g.Sacrifice(0, 4)
	g.Sacrifice(1, 0)
	g.Sacrifice(1, 4)
	fmt.Println(g)
	g.CutAt(10)
	fmt.Println(g)
	g.Reset()
	fmt.Println(g)
	g.DealRound()
	fmt.Println(g)
}