Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
1464070339
|
|||
066ec431ff
|
|||
3455579be6
|
|||
5a7cb58707
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,3 +21,5 @@
|
||||
# Go workspace file
|
||||
go.work
|
||||
|
||||
# Visual studio Code exclusions
|
||||
.vscode/settings.json
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
Basic engine for NationStates-like "make decisions on issues" simulation games. Very incomplete.
|
||||
|
||||
[](https://pkg.go.dev/git.chromaticdragon.app/kistaro/CardSimEngine)
|
||||
|
||||
## General turn model
|
||||
|
||||
1. Player has a hand of cards. Each card has one or more actions available.
|
||||
|
@ -206,14 +206,11 @@ func displayMessageSection[C StatsCollection](p *Player[C]) bool {
|
||||
if len(p.TemporaryMessages) == 0 {
|
||||
return false
|
||||
}
|
||||
hasPrevious := false
|
||||
for _, m := range p.TemporaryMessages {
|
||||
if m != nil {
|
||||
if hasPrevious {
|
||||
lightDivider()
|
||||
}
|
||||
display(m)
|
||||
hasPrevious = true
|
||||
} else {
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
5
go.mod
5
go.mod
@ -1,9 +1,10 @@
|
||||
module cardSimEngine
|
||||
module git.chromaticdragon.app/kistaro/CardSimEngine
|
||||
|
||||
go 1.20
|
||||
|
||||
require github.com/kr/pretty v0.3.1
|
||||
|
||||
require (
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
)
|
||||
|
@ -1,9 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cardSimEngine/cardsim"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"git.chromaticdragon.app/kistaro/CardSimEngine/cardsim"
|
||||
)
|
||||
|
||||
// Type aliases, unlike distinctly named types, are fully substitutable for
|
||||
|
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cardSimEngine/cardsim"
|
||||
"git.chromaticdragon.app/kistaro/CardSimEngine/cardsim"
|
||||
)
|
||||
|
||||
// SmokeTestCollection is a stats collection for the simple test sim.
|
||||
|
@ -2,9 +2,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cardSimEngine/cardsim"
|
||||
"fmt"
|
||||
|
||||
"git.chromaticdragon.app/kistaro/CardSimEngine/cardsim"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
)
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cardSimEngine/cardsim"
|
||||
"math"
|
||||
|
||||
"git.chromaticdragon.app/kistaro/CardSimEngine/cardsim"
|
||||
)
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user