Files
095-assignment-space-invaders/docs/wiki/Step-4-Alien-Fleet.md
Tirsvad 0449c45507 Add the README screenshots, the wiki in three languages and the reflection
Task: MIL-003#1
Task: MIL-003#2
Task: MIL-003#3
Task: MIL-003#4
Task: MIL-003#5
Task: MIL-003#6
2026-11-21 18:29:47 +08:00

1006 B

English · Dansk · Bahasa Malaysia

Step 4: Alien fleet

Five rows of aliens in different colours

What we built

The Alien and Fleet classes: five rows of eight aliens, each row in its own colour, centred at the top of the screen. The positions are worked out by fleet_positions in rules.py.

What we gained

  • Turning a grid into a list of positions with nested loops
  • Separating the layout calculation (pure, tested) from the drawing
  • Using one colour per row to tell rows apart
  • Keeping the alien objects in a list the rest of the game can use

Try it

Start the game; the fleet is in place.

Where the code is

src/alien.py, src/fleet.py, src/rules.py: fleet_positions

Previous: Shooting · Next: Alien movement · Overview