/*
Cosmic Intruders
Authors: James, Nick, Jon

The class representing the player ship
*/

public class PlayerShip
{
    private int mid;
    private int hp;
    private int x; //the player's x coordinate
    private int y; //the player's y coordinate
    private final int l = 96; //the player sprite's length
    private final int h = 108; //the player sprite's height
    public PlayerShip(int windowLength)
    {
        mid = (windowLength - l)/2;
        x = mid;
    }
    public void setX(int value)
    {
        x = value;
    }
    public void setY(int value)
    {
        y = value;
    }
    public int getX()
    {
        return x;
    }
    public int getY()
    {
        return y;
    }
}

@@ -113,29 +113,8 @@
 p%0A%7B%0A
-    private int mid;%0A
     
@@ -380,16 +380,34 @@
 owLength
+, int windowHeight
 )%0A    %7B%0A
@@ -414,19 +414,17 @@
         
-mid
+x
  = (wind
@@ -444,23 +444,42 @@
 /2;%0A
-        x = mid
+%09y = (windowHeight - l)/2;%0A%09hp = 5
 ;%0A  
@@ -712,10 +712,188 @@
 ;%0A    %7D%0A
-%7D
+    public void hit() //when the player gets hit%0A    %7B%0A%09hp--;%0A    %7D%0A    public int getL()%0A    %7B%0A        return l;%0A    %7D%0A    public int getH()%0A    %7B%0A        return h;%0A    %7D%0A    %0A%7D%0A
 %0A

Update PlayerShip.java