public void PlayerAtThreeXThreeAndPlayerAtFourXFourTileOnGoneFourThreeNormalSurroundedGone()
        {
            //Arrange
            var islandTile = IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3);

            islandTile.PlayersOnTile.Add(Diver);
            islandTile = IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 4);
            islandTile.PlayersOnTile.Add(Pilot);

            IslandBoard.Single(x => x.RowNumber == 2 && x.ColumnNumber == 2).SubmergedState = TileState.Gone.ToString();
            IslandBoard.Single(x => x.RowNumber == 2 && x.ColumnNumber == 3).SubmergedState = TileState.Gone.ToString();
            IslandBoard.Single(x => x.RowNumber == 2 && x.ColumnNumber == 4).SubmergedState = TileState.Gone.ToString();

            IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 2).SubmergedState = TileState.Gone.ToString();
            IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3).SubmergedState = TileState.Gone.ToString();
            IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 4).SubmergedState = TileState.Gone.ToString();

            IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 2).SubmergedState = TileState.Gone.ToString();
            IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 3).SubmergedState = TileState.Gone.ToString();
            IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 4).SubmergedState = TileState.Gone.ToString();

            var canLose = new CanLose_PlayerTilesLost();

            //Act
            var result = canLose.IsValid(IslandBoard, 0);

            //Assert
            Assert.AreEqual(result.IsValid, false);
            Assert.AreEqual(result.ErrorMessage, DiverHasDrowned);
        }
        public void PlayerAtThreeXThreeTileOnGoneFourFourNormalRestFlodded()
        {
            //Arrange
            var islandTile = IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3);

            islandTile.PlayersOnTile.Add(Diver);

            IslandBoard.Single(x => x.RowNumber == 2 && x.ColumnNumber == 2).SubmergedState = TileState.Flodded.ToString();
            IslandBoard.Single(x => x.RowNumber == 2 && x.ColumnNumber == 3).SubmergedState = TileState.Flodded.ToString();
            IslandBoard.Single(x => x.RowNumber == 2 && x.ColumnNumber == 4).SubmergedState = TileState.Flodded.ToString();

            IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 2).SubmergedState = TileState.Flodded.ToString();
            IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3).SubmergedState = TileState.Flodded.ToString();
            IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 4).SubmergedState = TileState.Flodded.ToString();

            IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 2).SubmergedState = TileState.Flodded.ToString();
            IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 3).SubmergedState = TileState.Flodded.ToString();
            IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 4).SubmergedState = TileState.Normal.ToString();

            var canLose = new CanLose_PlayerTilesLost();

            //Act
            var result = canLose.IsValid(IslandBoard, 0);

            //Assert
            Assert.AreEqual(result.IsValid, true);
            Assert.AreEqual(result.ErrorMessage, null);
        }
        public void PlayerAtThreeXThreeAllTilesOkay()
        {
            //Arrange
            var islandTile = IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3);

            islandTile.PlayersOnTile.Add(Diver);
            var canLose = new CanLose_PlayerTilesLost();

            //Act
            var result = canLose.IsValid(IslandBoard, 0);

            //Assert
            Assert.AreEqual(result.IsValid, true);
            Assert.AreEqual(result.ErrorMessage, null);
        }
        public void PlayerAtThreeXThreeAndPlayerAtFourXFourTileOnFloodedAllOthersOkay()
        {
            //Arrange
            var islandTile = IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3);

            islandTile.PlayersOnTile.Add(Diver);

            islandTile = IslandBoard.Single(x => x.RowNumber == 4 && x.ColumnNumber == 4);
            islandTile.PlayersOnTile.Add(Pilot);

            islandTile.SubmergedState = TileState.Flodded.ToString();

            var canLose = new CanLose_PlayerTilesLost();

            //Act
            var result = canLose.IsValid(IslandBoard, 0);

            //Assert
            Assert.AreEqual(result.IsValid, true);
            Assert.AreEqual(result.ErrorMessage, null);
        }
        public void TwoPlayerOnSameTileEveryThingFlooded()
        {
            //Arrange
            var islandTile = IslandBoard.Single(x => x.RowNumber == 3 && x.ColumnNumber == 3);

            islandTile.PlayersOnTile.Add(Diver);
            islandTile.PlayersOnTile.Add(Pilot);

            foreach (var tile in IslandBoard)
            {
                tile.SubmergedState = TileState.Flodded.ToString();
            }

            var canLose = new CanLose_PlayerTilesLost();

            //Act
            var result = canLose.IsValid(IslandBoard, 0);

            //Assert
            Assert.AreEqual(result.IsValid, true);
            Assert.AreEqual(result.ErrorMessage, null);
        }
        public void PlayerAtSixXThreeAndPlayerAtSixXFourEveryThingGone()
        {
            //Arrange
            var islandTile = IslandBoard.Single(x => x.RowNumber == 6 && x.ColumnNumber == 3);

            islandTile.PlayersOnTile.Add(Diver);
            islandTile = IslandBoard.Single(x => x.RowNumber == 6 && x.ColumnNumber == 4);
            islandTile.PlayersOnTile.Add(Pilot);

            foreach (var tile in IslandBoard)
            {
                tile.SubmergedState = TileState.Gone.ToString();
            }

            var canLose = new CanLose_PlayerTilesLost();

            //Act
            var result = canLose.IsValid(IslandBoard, 0);

            //Assert
            Assert.AreEqual(result.IsValid, false);
            Assert.AreEqual(result.ErrorMessage, DiverAndPilotHasDrowned);
        }