public void HasRoomAt_AfterCreated_ReturnsFalseForAll() { var falseForAll = Enumerable2D .Range(_map.Width, _map.Height) .All(p => !_map.HasRoomAt(p.x, p.y)); Assert.That(falseForAll); }
public void AddOuterWalls_WhenOneRoom_SurroundedByWalls() { var room = _map.CreateRoomAt(0, 0); _map.AddOuterWalls(); Assert.That(Enumerable2D.Range(room.Width, room.Height) .All(p => !(p.x == 0 || p.y == 0 || p.x == room.Width - 1 || p.y == room.Height - 1) || room[p.x, p.y] == Cells.Wall)); }