Fire bullets (Space Shooter)
Now F fires a bullet (|) from the cell just above the ship. Each tick, in order: apply the key, then every bullet that already existed moves up one row (a bullet fired this tick waits until the next tick); bullets that leave the top disappear. Draw bullets on the field.
Input: As before.
Output: As before.
Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Mark new bullets so they skip one move.