--- 01_the_screen/game.go 2025-10-06 10:40:36.384247800 -0400
+++ 02_mazes_and_enemies/game.go 2025-10-06 10:40:37.923662000 -0400
@@ -3,4 +3,5 @@
import (
"os"
+ "math/rand"
)
@@ -24,2 +25,10 @@
os.Exit(0)
}
+
+func (game *Game) PlaceEnemies(places []Position) {
+ for _, pos := range places {
+ if rand.Int() % 2 == 0 {
+ game.Enemies[pos] = &Enemy{10, pos, 4}
+ }
+ }
+}