Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function GenerateMap(ByVal size As Integer)
- Dim bitmap As New Bitmap(128, 128)
- Dim initial As UShort = 800
- Dim cur As UShort = initial
- Dim r As New FastRandom.FastRandom
- For x As Integer = 0 To size - 1
- For y As Integer = 0 To size - 1
- If cur > 0 Then
- Try
- bitmap.SetPixel(x, y, Color.FromArgb(0, (cur \ 4), 0))
- Catch
- bitmap.SetPixel(x, y, Color.Yellow)
- End Try
- Else
- bitmap.SetPixel(x, y, Color.Blue)
- End If
- Next
- Next
- Return bitmap
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement