From c846da24e1e64908ff69c9fbc66447e2f302b426 Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Tue, 21 Oct 2008 19:17:51 +0200 Subject: [PATCH] invaders: change enemy distribution This commit changes the distribution of enemies so that each row contains only one type of enemy. --- lib/invaders.lua.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/invaders.lua.in b/lib/invaders.lua.in index c9a2d8b8..9992659b 100644 --- a/lib/invaders.lua.in +++ b/lib/invaders.lua.in @@ -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