View difference between Paste ID: W1sHkiVA and e8E3sMTb
SHOW: | | - or go back to the newest paste.
1
n_beams = io.read('*n')
2
beams = {}
3
for i = 1, n_beams do
4
  x, y = io.read('*n', '*n')
5-
  beams[i] = {x, y})
5+
  beams[i] = {x, y}
6
end
7
8
hit_size = io.read('*n')
9
10
function this_alien_is_hit(x, y)
11
  -- you should create some code here
12
  return false
13
end
14
15
hits = {}
16
n_aliens = io.read('*n')
17
for j = 1, n_aliens do
18
  x, y = io.read('*n', '*n')
19
  if this_alien_is_hit(x, y) then
20
    hits[#hits+1] = x
21
  end
22
end
23
24
print('hits', table.concat(hits, ' '))
25