diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-12-28 11:38:44 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:59 +0100 |
| commit | 2ee42003433b2faeda4ded1bc6557a6eaf3720ff (patch) | |
| tree | ec619361d443732c375fea62853c6a6cb4c4d058 /go/game/attack.go | |
| parent | 00c718e7c7dd082da6aff619147c156c721861b7 (diff) | |
| download | muhqs-game-2ee42003433b2faeda4ded1bc6557a6eaf3720ff.tar.gz muhqs-game-2ee42003433b2faeda4ded1bc6557a6eaf3720ff.zip | |
improve code
* explicitly ignore errors where appropriate
* do not append in a loop
* specify format string in Errorf
Diffstat (limited to 'go/game/attack.go')
| -rw-r--r-- | go/game/attack.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/go/game/attack.go b/go/game/attack.go index 08bc9567..3896e142 100644 --- a/go/game/attack.go +++ b/go/game/attack.go @@ -12,7 +12,7 @@ type Attack struct { } func INVALID_ATTACK(a Attack) bool { - return a.attacks == nil || len(a.attacks) == 0 + return len(a.attacks) == 0 } func (a Attack) MaxRange() int { |
