Added a HUD which shows shield strength and score. These are currently hud
Added a HUD which shows shield strength and score. These are currently
just placeholder variables.

--- a/astroids.py
+++ b/astroids.py
@@ -91,6 +91,7 @@
         # Configuration
         self.speed=15
         self.limit_movement=30
+        self.shields=100
 
         # Cache some other definitions
         self.left=b2Vec2(-1,0)
@@ -193,12 +194,29 @@
             polygon.append((x[i],y[i]))
         return polygon
 
+class HUD(game.GameObject):
+    def __init__(self,game,name):
+        super(HUD,self).__init__(game,name)
+
+        self.font=pygame.font.Font(None, 35)
+        self.fg=(255,255,255)
+
+        self.height=self.font.size('A')[1]
+        print self.height
+
+    def draw(self,screen):
+        img=self.font.render('Distance: %d m'%self.game.score,True,self.fg)
+        screen.blit(img,(10,screen.get_size()[1]-self.height-10))
+
+        img=self.font.render('Sheilds: %d%%'%self.game.shipControl.shields,True,self.fg)
+        screen.blit(img,(screen.get_size()[0]-200,screen.get_size()[1]-self.height-10))
+
+
 
 class Astroids(game.Game):
     def __init__(self):
         game.Game.__init__(self,(640,480))
 
-        #self.viewZoom=40
         self.viewOffset=b2Vec2((-320,-100))
         self.viewZoom=10
         self.world.gravity=(0,0)
@@ -216,6 +234,10 @@
         self.shipControl=ShipControl(self)
         self.astroidGenerator=AstroidGenerator(self)
 
+        self.hud=HUD(self,'hud')
+
+        self.score=0
+
 g=Astroids()