diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-08-06 16:37:22 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:35 +0200 |
| commit | 121016509135952eb1144abdaa8aeabe5bebe682 (patch) | |
| tree | 6a5f35021865e4d391022c10970d91650e3e3f9e | |
| parent | f099060b457ef992424af38c38c528cc6227e48c (diff) | |
| download | muhqs-game-121016509135952eb1144abdaa8aeabe5bebe682.tar.gz muhqs-game-121016509135952eb1144abdaa8aeabe5bebe682.zip | |
simplify attacks copying
| -rw-r--r-- | go/game/attack.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/go/game/attack.go b/go/game/attack.go index 83ea6383..9fa71087 100644 --- a/go/game/attack.go +++ b/go/game/attack.go @@ -53,9 +53,7 @@ func (a Attack) MaxRange() int { // Copy returns a copy of the attack func (a Attack) Copy() Attack { copy := Attack{} - for _, v := range a.attacks { - copy.attacks = append(copy.attacks, v) - } + copy.attacks = append(copy.attacks, a.attacks...) return copy } |
