mirror of
https://github.com/ivabus/roulette
synced 2025-04-23 14:07:09 +03:00
Clearing code
This commit is contained in:
parent
9cd2aac5c4
commit
f86b9d41c4
1 changed files with 378 additions and 383 deletions
|
@ -19,13 +19,13 @@ Module Program
|
|||
For i = 0 To UBound(mass)
|
||||
If mass(i) = obj Then Return i
|
||||
Next
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
Sub displayHistory(history() As Integer)
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue
|
||||
Console.Write("История выпадений (последние 10): ")
|
||||
Dim start As Integer = If(Ubound(history) > 9, Ubound(history) - 10, 0)
|
||||
For i = start To UBound(history)
|
||||
Console.Write("История выпадений (последние 15): ")
|
||||
For i = If(Ubound(history) > 14, Ubound(history) - 15, 0) To UBound(history)
|
||||
Console.ForegroundColor = colors(ring(1,getindex(ringRank0, history(i))))
|
||||
Console.Write(history(i) & " ")
|
||||
Next
|
||||
|
@ -36,16 +36,10 @@ Module Program
|
|||
Dim uBound = arr.GetUpperBound(0)
|
||||
Dim lBound = arr.GetLowerBound(0)
|
||||
Dim arrLen = uBound - lBound
|
||||
|
||||
If index < lBound OrElse index > uBound Then
|
||||
Throw New ArgumentOutOfRangeException( _
|
||||
String.Format("Index must be from {0} to {1}.", lBound, uBound))
|
||||
Else
|
||||
Dim outArr(arrLen - 1) As T
|
||||
Array.Copy(arr, 0, outArr, 0, index)
|
||||
Array.Copy(arr, index + 1, outArr, index, uBound - index)
|
||||
Return outArr
|
||||
End If
|
||||
End Function
|
||||
|
||||
Sub sleep(d As Single)
|
||||
|
@ -60,23 +54,23 @@ Module Program
|
|||
For i = 0 To UBound(intr)
|
||||
Console.WriteLine(intr(i))
|
||||
Console.SetCursorPosition(Console.WindowWidth \ 2 - Len(intr(0))\2, Console.GetCursorPosition().Item2)
|
||||
sleep(0.0888)
|
||||
sleep(0.04444)
|
||||
Next
|
||||
'sleep(5)
|
||||
Console.SetCursorPosition(0,0)
|
||||
For i = 0 To (Console.WindowHeight()\2 - UBound(intr) + 2) \ 2
|
||||
Console.WriteLine(StrDup(Console.WindowWidth-1, "#"))
|
||||
sleep(0.0888)
|
||||
sleep(0.04444)
|
||||
Next
|
||||
For i = 0 To Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) - 3
|
||||
Console.Write(StrDup((Console.WindowWidth \ 2 - Len(intr(0)) \ 2) \ 2, "#"))
|
||||
Console.SetCursorPosition(Console.WindowWidth - (Console.WindowWidth \ 2 - Len(intr(0)) \ 2) \ 2, (Console.GetCursorPosition().Item2))
|
||||
Console.WriteLine(StrDup((Console.WindowWidth \ 2 - Len(intr(0)) \ 2) \ 2 - 1, "#"))
|
||||
sleep(0.0888)
|
||||
sleep(0.04444)
|
||||
Next
|
||||
For i = 0 To (Console.WindowHeight()\2 - UBound(intr) + 2) \ 2
|
||||
Console.WriteLine(StrDup(Console.WindowWidth-1, "#"))
|
||||
sleep(0.0888)
|
||||
sleep(0.04444)
|
||||
Next
|
||||
Dim entr As String = " Нажмите любую кнопку, чтобы начать игру! "
|
||||
Console.SetCursorPosition((Console.WindowWidth \ 2) - Len(entr) \ 2,Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) \ 4 - 1)
|
||||
|
@ -100,6 +94,7 @@ Module Program
|
|||
For k = 0 To rnd.Next(1,5)
|
||||
For i = 0 To rnd.Next(1,rnd.Next(5,100))
|
||||
rnd.NextDouble()
|
||||
Randomize
|
||||
Next
|
||||
Next
|
||||
|
||||
|
@ -310,7 +305,7 @@ Module Program
|
|||
End If
|
||||
Next
|
||||
Console.WriteLine("Крутим колесо...")
|
||||
sleep(2)
|
||||
sleep(1)
|
||||
display(Int(generated(0)))
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue
|
||||
Dim indedx As Integer
|
||||
|
|
Loading…
Reference in a new issue