Beispiel #1
0
        //tests the world dicitonaries
        public void CountShips()
        {
            World theWorld = new World();

            theWorld.worldSize = 750;
            theWorld.generatenewShip("1");
            theWorld.generatenewShip("2");
            Assert.IsTrue(theWorld.getShipCollection().Count == 2);
        }
Beispiel #2
0
        //tests the ships setup in the world
        public void ShipID()
        {
            World theWorld = new World();

            theWorld.worldSize = 750;
            theWorld.generatenewShip("3");
            theWorld.generatenewShip("4");
            Dictionary <int, Ship> sc = new Dictionary <int, Ship>();

            sc = theWorld.getShipCollection();
            //checking name against the id
            Assert.AreEqual(1, sc[1].getShipId());
            Assert.IsTrue(2 == sc[2].getShipId());
        }