Move to entity structs
This commit is contained in:
5
src/game/rule/end.go
Normal file
5
src/game/rule/end.go
Normal 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
5
src/game/rule/hand.go
Normal 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
5
src/game/rule/phase.go
Normal 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
7
src/game/rule/rule.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package rule
|
||||
|
||||
type Rule struct {
|
||||
Ends []End
|
||||
Phases []Phase
|
||||
Hands []Hand
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user