Move to entity structs

This commit is contained in:
Bel LaPointe
2021-03-16 22:40:26 -05:00
parent 3a8985486a
commit 3e71ab6217
11 changed files with 179 additions and 25 deletions

5
src/game/rule/end.go Normal file
View File

@@ -0,0 +1,5 @@
package rule
import "local/sandbox/cards/src/game/rule/operation"
type End operation.Bool

5
src/game/rule/hand.go Normal file
View File

@@ -0,0 +1,5 @@
package rule
import "local/sandbox/cards/src/game/rule/operation"
type Hand operation.Int

5
src/game/rule/phase.go Normal file
View File

@@ -0,0 +1,5 @@
package rule
import "local/sandbox/cards/src/game/rule/operation"
type Phase operation.Bool

7
src/game/rule/rule.go Normal file
View File

@@ -0,0 +1,7 @@
package rule
type Rule struct {
Ends []End
Phases []Phase
Hands []Hand
}

View File

@@ -45,9 +45,9 @@ func TestMasterUpdate(t *testing.T) {
}
game.Players.Add(entity.Player{
ID: "hi",
ID: "hi",
Pot: 123,
})
game.Pot = 123
err = gm.ReplaceGame(id, game)
if err != nil {
t.Fatal(err)