Exemplo n.º 1
0
        public void ShootTest()
        {
            IComputerStrategy cs = new OneHitStategy();

            ShotsBoardCellState[,] table = new ShotsBoardCellState[, ] {
                { ShotsBoardCellState.Missed, ShotsBoardCellState.Missed, ShotsBoardCellState.Killed },
                { ShotsBoardCellState.Unknown, ShotsBoardCellState.Missed, ShotsBoardCellState.Killed },
                { ShotsBoardCellState.Wounded, ShotsBoardCellState.Missed, ShotsBoardCellState.Unknown }
            };
            Assert.IsTrue(cs.Shoot(table).y == 0 && cs.Shoot(table).x == 1);
        }
Exemplo n.º 2
0
 void reinit()
 {
     player1shots = new ShotsBoardCellState[height, width];
     player2shots = new ShotsBoardCellState[height, width];
 }