;@modern
; Three enemies made of one player: sprites in bands

BYTE ARRAY enemy=[$3C $7E $DB $FF $FF $A5 $81 $C3]

PROC Main()
  BYTE i, t

  Graphics(0)
  PMGraphics(1)
  FOR i=0 TO 2
  DO
    PMSprite(8+i, 0, i+1)             ; sprite 8+i is player 0 in band i+1
    PMBand(i+1, 4+6*i)                ; bands from text rows 4, 10 and 16
    PMCreate(8+i, enemy, 8, 1, 50+20*i, 32+8*(5+6*i))  ; on rows 5, 11, 17
  OD
  PMColor(8, 4, 8)                    ; red
  PMColor(9, 12, 10)                  ; green
  PMColor(10, 8, 12)                  ; blue
  PMBands(4)                          ; band 0 (the top) and bands 1-3

  FOR t=1 TO 100
  DO
    PMWait()
    FOR i=0 TO 2
    DO
      PMHPos(8+i, PMX(8+i)+1)         ; each one in its own band
    OD
  OD

  FOR i=0 TO 2
  DO
    Print("Enemy ")
    PrintB(i+1)
    Print(" stopped at x=")
    PrintBE(PMX(8+i))
  OD
RETURN
