invaders: change enemy distribution

This commit changes the distribution of enemies so that each row
contains only one type of enemy.
This commit is contained in:
Gregor Best 2008-10-21 19:17:51 +02:00 committed by Julien Danjou
parent 7b6ba906d4
commit c846da24e1
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ function enemies.setup()
for y = 1, gamedata.enemies.rows do
gamedata.enemies.data[y] = { }
for x = 1, math.ceil((gamedata.enemies.count / gamedata.enemies.rows) + 1) do
gamedata.enemies.data[y][x] = enemies.new( math.random(1, 3) )
gamedata.enemies.data[y][x] = enemies.new((y % 3) + 1)
end
end