aboutsummaryrefslogtreecommitdiff
path: root/go/game/playerControl_test.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-15 20:52:55 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:38 +0200
commit488f6377e6f6fd3099bb927a986d548fbc1eb63f (patch)
tree6cf6a3daed56b279a1f708cc03e551a387810640 /go/game/playerControl_test.go
parent139ad01740eba2ff1e0a9d46593d2278b32310ce (diff)
downloadmuhqs-game-488f6377e6f6fd3099bb927a986d548fbc1eb63f.tar.gz
muhqs-game-488f6377e6f6fd3099bb927a986d548fbc1eb63f.zip
implement mace and add damage dealt events/triggers
Diffstat (limited to 'go/game/playerControl_test.go')
-rw-r--r--go/game/playerControl_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/go/game/playerControl_test.go b/go/game/playerControl_test.go
index 0182e30b..2727df0b 100644
--- a/go/game/playerControl_test.go
+++ b/go/game/playerControl_test.go
@@ -7,9 +7,10 @@ import (
type MockPlayerControl struct {
p *Player
sentNotifications []PlayerNotification
+ actionToSend Action
}
-func newMockPlayerControl(p *Player) PlayerControl {
+func newMockPlayerControl(p *Player) *MockPlayerControl {
return &MockPlayerControl{p: p}
}
@@ -25,7 +26,7 @@ func (ctrl *MockPlayerControl) SendNotification(n PlayerNotification) error {
}
func (ctrl *MockPlayerControl) RecvAction() (Action, error) {
- return nil, nil
+ return ctrl.actionToSend, nil
}
func (ctrl *MockPlayerControl) SendAction(Action) error { return nil }