                 player)
         eff
             (Math/pow efficiency time-step)
+
+        player
+            (step-thing player time-step eff)
         ]
-    (step-thing player time-step eff)))
+    player))
 
 (defn asteroid-step [asteroid time-step]
     (step-thing asteroid time-step 1.0))
 
+(defn new-bullet [player]
+    (assoc player
+        :xv (+ (:xv player) (* (Math/cos (:a player)) bullet-velocity))
+        :yv (+ (:yv player) (* (Math/sin (:a player)) bullet-velocity))
+))
+
+(defn bullet-step [bullet time-step]
+    (step-thing bullet time-step 1.0))
+
 (defn game-step [state keys-pressed]
-    (let [new-time (now) time-step (- new-time (:time state))]
+    (let [
+        new-time (now)
+        time-step (- new-time (:time state))
+        spawn-new-bullet (and (contains? keys-pressed KeyEvent/VK_SPACE) (>= new-time (:next-fire-time state)))
+        ]
         (assoc state
             :time new-time
             :player (player-step (:player state) time-step keys-pressed)
             :asteroids (map (fn [a] (asteroid-step a time-step)) (:asteroids state))
+            :bullets
+                (map (fn [b] (bullet-step b time-step))
+                    (concat
+                        (if spawn-new-bullet
+                            [(new-bullet (:player state))]
+                            [])
+                    (:bullets state)))
+            :next-fire-time
+                (if spawn-new-bullet
+                    (+ new-time fire-delay)
+                    (:next-fire-time state))
 )))
 
 (defn create-game []

        (.addPoint 10 0)
        (.addPoint -3 5)
        (.addPoint -3 -5)))

(defn draw-player [player g]
    (do

        (let [rect (.getClipBounds g)]
            (.fillRect g (.x rect) (.y rect) (.width rect) (.height rect)))
        (draw-player (:player state) g))
        (doseq [a (:asteroids state)] (draw-asteroid a g))
        (doseq [b (:bullets state)] (draw-bullet b g)))

(defn create-component [game-state]
    (doto
