Made Intro

This commit is contained in:
Ivan Bushchik 2021-04-08 20:14:30 +03:00
parent 683eaa2db5
commit 0a4c518c84

View file

@ -6,6 +6,16 @@ Module Program
{0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2}} {0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2}}
Dim colors() As ConsoleColor = {ConsoleColor.White, ConsoleColor.Red, ConsoleColor.Black} Dim colors() As ConsoleColor = {ConsoleColor.White, ConsoleColor.Red, ConsoleColor.Black}
Dim ringRank0() As Integer = {0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, 24, 16, 33, 1, 20, 14, 31, 9, 22,18, 29, 7, 28, 12, 35, 3, 26} Dim ringRank0() As Integer = {0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, 24, 16, 33, 1, 20, 14, 31, 9, 22,18, 29, 7, 28, 12, 35, 3, 26}
Dim intr() As String = {
"#### ### # # # ##### ##### ##### #####",
"# # # # # # # # # # # ",
"# # # # # # # # # # # ",
"# # # # # # # # # # # ",
"#### # # # # # #### # # #### ",
"## # # # # # # # # # ",
"# # # # # # # # # # # ",
"# # # # # # # # # # # ",
"# # ### ### ##### ##### # # ##### "}
Function GetIndex(mass() As Integer, obj As Integer) As Integer Function GetIndex(mass() As Integer, obj As Integer) As Integer
For i = 0 To UBound(mass) For i = 0 To UBound(mass)
If mass(i) = obj Then Return i If mass(i) = obj Then Return i
@ -18,6 +28,32 @@ Module Program
Loop Loop
End Sub End Sub
Sub intro()
Console.SetCursorPosition(Console.WindowWidth \ 2 - Len(intr(0))\2,Console.WindowHeight()\2 - UBound(intr) + 2)
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)
Next
'sleep(5)
Console.SetCursorPosition(0,0)
For i = 0 To (Console.WindowHeight()\2 - UBound(intr) + 2) \ 2
Console.Write(StrDup(Console.WindowWidth, "#"))
sleep(0.0888)
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)
Next
For i = 0 To (Console.WindowHeight()\2 - UBound(intr) + 2) \ 2
Console.Write(StrDup(Console.WindowWidth, "#"))
sleep(0.0888)
Next
Console.ReadKey
End Sub
Function spinWheel() As String() Function spinWheel() As String()
Dim rnd As New Random Dim rnd As New Random
Dim probability(36) As Double Dim probability(36) As Double
@ -188,6 +224,7 @@ Module Program
Randomize() Randomize()
Console.Clear() Console.Clear()
Console.ForegroundColor = ConsoleColor.Black Console.ForegroundColor = ConsoleColor.Black
intro()
'Console.SetWindowSize(108,100) 'Console.SetWindowSize(108,100)
Console.WriteLine("Игра Рулетка") Console.WriteLine("Игра Рулетка")
Console.WriteLine("1) Начать игру") Console.WriteLine("1) Начать игру")