<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,6 +25,8 @@ module Client
       end
     
       def update_window
+        return unless @game.should_run?
+        
         if @window.button_down? Gosu::Button::KbEscape
           @game.shutdown!
         end</diff>
      <filename>lib/client/graphical/client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,6 +37,10 @@ module Game
       player
     end
   
+    def should_run?
+      !@shutdown
+    end
+  
     protected
   
     def init_game_state
@@ -73,7 +77,7 @@ module Game
     def game_loop
       Logger.info &quot;All systems go! Starting main game loop.&quot;
       
-      while game_should_run?
+      while self.should_run?
         start_time = Time.now.to_f
       
         @clients.each do |client|
@@ -85,9 +89,5 @@ module Game
       end
       Logger.info(&quot;fin&quot;)
     end
-  
-    def game_should_run?
-      !@shutdown
-    end
   end
 end</diff>
      <filename>lib/game/base.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9085c1f589dd47de688e3087b9aeff0637992b7e</id>
    </parent>
  </parents>
  <author>
    <name>Thorben Schr&#246;der</name>
    <email>thorben.schroeder@gmail.com</email>
  </author>
  <url>http://github.com/walski/beefdump/commit/ad1393eb10a5ce043b6eb576a2e28b8624dad425</url>
  <id>ad1393eb10a5ce043b6eb576a2e28b8624dad425</id>
  <committed-date>2009-10-08T00:21:08-07:00</committed-date>
  <authored-date>2009-10-08T00:21:08-07:00</authored-date>
  <message>Graphical client sends shutdown signal not a
hundred times anymore when quitting by
pressing escape.</message>
  <tree>0f12f4945ddee0ca9aebb1cc603556b2e1661b6a</tree>
  <committer>
    <name>Thorben Schr&#246;der</name>
    <email>thorben.schroeder@gmail.com</email>
  </committer>
</commit>
