   process.exit()
 
 process.stdin.on 'data', (c) ->
-  return exit 'q' if "#{c}" is 'q'
+  return do_exit 'q' if "#{c}" is 'q'
+  if game_over
+    switch "#{c}"
+      when 'y' then restartGame()
+      else do_exit 'q'
+    return
   exiting = no
   switch "#{c}"
     when 'h' then me.moveLeft()

    when 'k' then me.moveUp()
    when 'l' then me.moveRight()
  entity.moveTowards me for entity in entities

charm.removeAllListeners('^C')
charm.on '^C', ->

  en

me = e '¤', 'cyan', 15, 15

me.die = ->
  message 'Game over, you died :(', 'red'
  game_over = yes

entities = [
  e '¥', 'red', 7, 5
  e '¥', 'red', 1, 15
