Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n_beams = io.read('*n')
- beams = {}
- for i = 1, n_beams do
- x, y = io.read('*n', '*n')
- beams[i] = {x, y}
- end
- hit_size = io.read('*n')
- function this_alien_is_hit(x, y)
- -- you should create some code here
- return false
- end
- hits = {}
- n_aliens = io.read('*n')
- for j = 1, n_aliens do
- x, y = io.read('*n', '*n')
- if this_alien_is_hit(x, y) then
- hits[#hits+1] = x
- end
- end
- print('hits', table.concat(hits, ' '))
Advertisement
Add Comment
Please, Sign In to add comment