1 / 16

Project Starfighter 1.1

Project Starfighter 1.1. Team 15. User Stories for 1.1 Part 1. As a user upon starting the application I want to hear music. Upon starting the game new music is played As a user who clicks on the menu option, 'instructions,' I want to be presented with the instructions to play the game.

guido
Download Presentation

Project Starfighter 1.1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project Starfighter 1.1 Team 15

  2. User Stories for 1.1 Part 1 • As a user upon starting the application I want to hear music. Upon starting the game new music is played • As a user who clicks on the menu option, 'instructions,' I want to be presented with the instructions to play the game. • As a user controlling the ship I want to be able to move up, down, left and right. • As a user controlling the ship I want to be able to shoot a laser

  3. Music Test Code • boolstartMenuSong = true; • boolstartLevelOneSong = false; • public Starfighter_Test() • { • Test_Load(); • HandleStartScreen_Test(); • HandleActionScreen_Test(); • }

  4. [TestMethod] • public void Test_Load() • { • string songlocation = "Menu"; • Assert.IsNotNull(songlocation); • boolrepeatSong = true; • Assert.IsTrue(repeatSong); • } • [TestMethod] • public void HandleStartScreen_Test() • { • Assert.istrue(startMenuSong); • startMenuSong = false; • Assert.IsFalse(startMenuSong); • }

  5. [TestMethod] • public void HandleActionScreen_Test() • { • Assert.IsFalse(startLevelOneSong); • startLevelOneSong = true; • Assert.IsTrue(startMenuSong); • startLevelOneSong = false; • Assert.IsFalse(startLevelOneSong); • }

  6. Ship Movement Test Code • [TestClass] • public class ShipMovements • { • ActionScreenbckgnd = new ActionScreen(); • Player p = new Player(); • [TestMethod] • public void ShipMovingRight_Test() //left is just like this one • { • bckgnd.BackgroundOffset = 0; • bckgnd.BackgroundOffset += 1; • Assert.AreEqual(1, bckgnd.BackgroundOffset); • }

  7. Ship Movement Test Code (cont) • [TestMethod] • public void ShipMovingUp_Test() // moving down test is just like it • { • p.Y = 0; • p.Y += 1; • Assert.AreEqual(1, p.Y); • }

  8. Instructions Test Code • [TestClass] • public class InstructionsScreen_Test • { • [TestInitialize()] • public void TestInitialize() • { • Starfighter game = new Starfighter(); • } • InstructionsScreentestInstructionsScreen; • private TestContexttestContextInstance; • [TestMethod] • public void TestScreen() • { • Assert.IsNotNull(testInstructionsScreen); • }

  9. Instructions Test Code (cont) • [TestMethod] • public void TestType() • { • Assert.IsInstanceOfType(testInstructionsScreen, typeof(InstructionsScreen)); • } • } • public TestContextTestContext { • get • { return testContextInstance; } • set • { testContextInstance = value; }

  10. Laser Test Code [TestMethod] public void XPosition_Test() { testammo.aLocation.X = 11f; Assert.IsTrue(11f == testammo.aLocation.X); } [TestMethod] public void YPosition_Test() { testammo.aLocation.Y = 12f; Assert.IsTrue(12f == testammo.aLocation.Y); }

  11. [TestMethod] public void createdInActive_Test() { Assert.IsTrue(false == testammo.IsActive); } [TestMethod] public void fired_Test() { testammo.Fire(21, 33); Assert.IsTrue(true == testammo.IsActive); }

  12. [TestMethod] public void firedXPosition_Test() { testammo.Fire(21, 33); Assert.AreEqual(21f, testammo.aLocation.X); } [TestMethod] public void firedYPosition_Test() { testammo.Fire(21, 33); Assert.AreEqual(33f, testammo.aLocation.Y); }

  13. //[TestMethod] //public void Speed_Test() //{ // testammo.Speed = 10f; // Assert.IsTrue(10f == testammo.Speed); //} [TestMethod] public void BoundingBox_Test() { testammo.Fire(21, 33); Rectangle r = new Rectangle(21, 33, 16, 3); Assert.AreEqual(r, testammo.BoundingBox); }

  14. Demo

  15. Status of the Game • At this point all of the menu options except for high score are complete. • The ship can move. The background is also set to auto scroll. • The ship can now shoot a laser, but only one at a time.

  16. Plans for version 1.2 • Adjust speed of the ship to move faster • Allow multiple lasers to be fired. • Add sound effects • Create an enemy type 1 (doesn’t fire anything) • Create collision box for collisions • Set up player lives • Create collision detection for laser hitting enemy • Calculate score based on destruction of enemy

More Related