dont allow playing from max hand size
This commit is contained in:
parent
36013e0b89
commit
6f16a13051
2
game.go
2
game.go
@ -369,7 +369,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
||||
log.Println(err)
|
||||
return nil
|
||||
}
|
||||
if x_i < 0 || x_i > len(curr.Hand) {
|
||||
if x_i < 0 || x_i >= len(curr.Hand) {
|
||||
return nil
|
||||
}
|
||||
card := curr.Hand[x_i]
|
||||
|
3
go.mod
3
go.mod
@ -3,7 +3,6 @@ module git.saintnet.tech/tomecraft/tome_game
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.1 // indirect
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.2 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
)
|
||||
|
||||
|
4
go.sum
4
go.sum
@ -1,4 +1,8 @@
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.0 h1:c+AMtXgLKUFErrYFx7g8M2zVcrHUwLRY18v/+N8nn2I=
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.0/go.mod h1:Jekqa9ojNDOrcO1aL0IWKuhCQSE5+MNHVcYtTWA6uko=
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.1 h1:WAX/9oQxkZeftWvy/dow00XUO+ZCp0/yOStCSL+T3nE=
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.1/go.mod h1:Jekqa9ojNDOrcO1aL0IWKuhCQSE5+MNHVcYtTWA6uko=
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.2 h1:S2BHgsWBGFv9fy+qBHuKXv0kcjT7VP/7gDmJHje/+RQ=
|
||||
git.saintnet.tech/tomecraft/tome_lib v0.1.2/go.mod h1:Jekqa9ojNDOrcO1aL0IWKuhCQSE5+MNHVcYtTWA6uko=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
|
Loading…
Reference in New Issue
Block a user