@@ -0,0 +1,1505 @@
+package me.dreamteam.tardis;%0A%0A/**%0A * The entity that represents the players ship%0A */%0A%0Apublic class ShipEntity extends Entity %7B%0A%09/** The game in which the ship exists */%0A%09private Game game;%0A%09%0A%09/**%0A%09 * Create a new entity to represent the players ship%0A%09 *  %0A%09 * @param game The game in which the ship is being created%0A%09 * @param ref The reference to the sprite to show for the ship%0A%09 * @param x The initial x location of the player's ship%0A%09 * @param y The initial y location of the player's ship%0A%09 */%0A%09public ShipEntity(Game game,String ref,int x,int y) %7B%0A%09%09super(ref,x,y);%0A%09%09%0A%09%09this.game = game;%0A%09%7D%0A%09%0A%09/**%0A%09 * Request that the ship move itself based on an elapsed amount of%0A%09 * time%0A%09 * %0A%09 * @param delta The time that has elapsed since last move (ms)%0A%09 */%0A%09public void move(long delta) %7B%0A%09%09// if we're moving left and have reached the left hand side%0A%09%09// of the screen, don't move%0A%09%09// !! This will be vital for our game which means we can force the ship to stay within the frame.%0A%09%09if ((dx %3C 0) && (x %3C 10)) %7B%0A%09%09%09return;%0A%09%09%7D%0A%09%09// if we're moving right and have reached the right hand side%0A%09%09// of the screen, don't move%0A%09%09// !! This will be vital for our game which means we can force the ship to stay within the frame.%0A%09%09if ((dx %3E 0) && (x %3E 750)) %7B%0A%09%09%09return;%0A%09%09%7D%0A%09%09%0A%09%09super.move(delta);%0A%09%7D%0A%09%0A%09/**%0A%09 * Notification that the player's ship has collided with something%0A%09 * %0A%09 * @param other The entity with which the ship has collided%0A%09 */%0A%09%0A%09public void collidedWith(Entity other) %7B%0A%09%0A%09%09// TBD%0A%09%09%09%0A%09%09%7D%0A%09%7D

Prepare for Ship Entity