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-06 16:37:22 +0200 |
| commit | 11bf280575d9c5cb27b93b95200acd5a84d147ca (patch) | |
| tree | ad24138eea03355c5cf55570309a4f74cc193fc5 | |
| parent | 9c2bea799e039dc7458cc05b16cbf4046f70fe75 (diff) | |
| download | muhqs-game-11bf280575d9c5cb27b93b95200acd5a84d147ca.tar.gz muhqs-game-11bf280575d9c5cb27b93b95200acd5a84d147ca.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 } |
