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); }
void reinit() { player1shots = new ShotsBoardCellState[height, width]; player2shots = new ShotsBoardCellState[height, width]; }