Ejemplo n.º 1
0
        public void SeaGridHitTileTest()
        {
            seaGrid = new SeaGrid(Ships);
            seaGrid.MoveShip(0, 0, ShipName.Tug, Direction.LeftRight);
            AttackResult ar = seaGrid.HitTile(0, 0);

            Assert.AreEqual(ar.Value, ResultOfAttack.Destroyed);
        }
Ejemplo n.º 2
0
 // <summary>
 // HitTile calls oppon _MyGrid to hit a tile at the row, col
 // </summary>
 // <param name="row">the row its hitting at</param>
 // <param name="col">the column its hitting at</param>
 // <returns>The result from hitting that tile</returns>
 public AttackResult HitTile(int row, int col)
 {
     return(_MyGrid.HitTile(row, col));
 }
Ejemplo n.º 3
0
 public void TestSeaGridHitTile()
 {
     _seaGrid.MoveShip(0, 0, ShipName.Destroyer, Direction.LeftRight);
     Assert.AreEqual(ResultOfAttack.Hit, _seaGrid.HitTile(0, 0).Value);
 }