mirror of
https://github.com/ivabus/roulette
synced 2024-11-22 16:35:09 +03:00
Fixed intro, and ZERO situation
This commit is contained in:
parent
67c734b120
commit
03ea817bd6
1 changed files with 7 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
Imports System
|
Imports System
|
||||||
|
|
||||||
Module Program
|
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},
|
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}}
|
{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}
|
||||||
|
@ -70,20 +71,20 @@ Module Program
|
||||||
Console.WriteLine(StrDup((Console.WindowWidth \ 2 - Len(intr(0)) \ 2) \ 2 - 1, "#"))
|
Console.WriteLine(StrDup((Console.WindowWidth \ 2 - Len(intr(0)) \ 2) \ 2 - 1, "#"))
|
||||||
sleep(0.04444)
|
sleep(0.04444)
|
||||||
Next
|
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, "#"))
|
Console.WriteLine(StrDup(Console.WindowWidth-1, "#"))
|
||||||
sleep(0.04444)
|
sleep(0.04444)
|
||||||
Next
|
Next
|
||||||
Dim entr As String = " Нажмите любую кнопку, чтобы начать игру! "
|
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.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.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.Write(StrDup(Len(entr) + 2, " "))
|
||||||
|
Console.SetCursorPosition(0,0)
|
||||||
Console.ReadKey
|
Console.ReadKey
|
||||||
Console.Clear
|
Console.Clear
|
||||||
End Sub
|
End Sub
|
||||||
|
@ -113,6 +114,7 @@ Module Program
|
||||||
|
|
||||||
whatDropped.Add(ring(0,dropped).ToString())
|
whatDropped.Add(ring(0,dropped).ToString())
|
||||||
|
|
||||||
|
If dropped = 0 Then return whatDropped
|
||||||
If ring(0, dropped) mod 2 = 0 And dropped > 0
|
If ring(0, dropped) mod 2 = 0 And dropped > 0
|
||||||
whatDropped.Add("EVEN")
|
whatDropped.Add("EVEN")
|
||||||
Else
|
Else
|
||||||
|
|
Loading…
Reference in a new issue