Fixed intro, and ZERO situation

This commit is contained in:
Ivan Bushchik 2021-05-05 11:06:06 +03:00
parent 67c734b120
commit 03ea817bd6

View file

@ -1,6 +1,7 @@
Imports System
Module Program
'https://github.com/BushchikIvan/roulette
Dim ring(,) 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},
{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}
@ -70,20 +71,20 @@ Module Program
Console.WriteLine(StrDup((Console.WindowWidth \ 2 - Len(intr(0)) \ 2) \ 2 - 1, "#"))
sleep(0.04444)
Next
For i = 0 To (Console.WindowHeight()\2 - UBound(intr) + 2) \ 2
For i = 0 To (Console.WindowHeight()\2 - UBound(intr) + 2) \ 2 - 1
Console.WriteLine(StrDup(Console.WindowWidth-1, "#"))
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)
Console.SetCursorPosition((Console.WindowWidth \ 2) - Len(entr) \ 2,Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) \ 4 - 3)
Console.Write(StrDup(Len(entr) + 2, " "))
Console.SetCursorPosition((Console.WindowWidth \ 2) - Len(entr) \ 2,Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) \ 4)
Console.SetCursorPosition((Console.WindowWidth \ 2) - Len(entr) \ 2,Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) \ 4 - 2)
Console.Write(entr & " ")
Console.SetCursorPosition((Console.WindowWidth \ 2) - Len(entr) \ 2,Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) \ 4 + 1)
Console.SetCursorPosition((Console.WindowWidth \ 2) - Len(entr) \ 2,Console.WindowHeight - (Console.WindowHeight()\2 - UBound(intr) + 2) \ 4 - 1)
Console.Write(StrDup(Len(entr) + 2, " "))
Console.SetCursorPosition(0,0)
Console.ReadKey
Console.Clear
End Sub
@ -113,6 +114,7 @@ Module Program
whatDropped.Add(ring(0,dropped).ToString())
If dropped = 0 Then return whatDropped
If ring(0, dropped) mod 2 = 0 And dropped > 0
whatDropped.Add("EVEN")
Else