Commits

Dino Drokan committed 81aa069

Added playership moving limitations on y axis.

Comments (0)

Files changed (1)

 void
 PlayerShip::keyDown(const SDL_Event &event)
 {
+    int lasty = y;
+    if(y < 145)
+        y = lasty +5;
+    if(y > 300)
+        y = lasty -5;
     switch(event.key.keysym.sym)
     {
         case SDLK_RIGHT: