Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Main
- Dim sample = Enumerable.Range(1, 4).Select(Function(x) New GatesPositions With
- {
- .intValue = CByte(x * 10),
- .Items = New Stack(Of Data)(enumerable.Range(0, 3).Select(Function(i) New data With
- {
- .X = i,
- .Y = i * 2
- }))
- }).ToArray
- sample.Dump
- Dim by20 = GetByRoll(sample, 20)
- by20.Dump("By 20")
- End Sub
- ' Define other methods and classes here
- Public Structure GatesPositions
- Public intValue As Byte
- Public Items As Stack(Of Data)
- End Structure
- Class Data
- Property X As Integer
- Property Y As Integer
- End Class
- Function GetByRoll(source As ienumerable(Of GatesPositions), roll As Integer) As IEnumerable(Of GatesPositions)
- Return source.Where(Function(g) g.intValue - roll <= 0)
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement