-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.vb
130 lines (120 loc) · 4.24 KB
/
Game.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Public Class Game
Public name As String
Public type As String
Public masterRules As String
Public banlist As String
Public mode As String = "TCG/OCG"
Public host As String
Public players As String
Public status As String
Public additionalRules As String = "Additional Rules: None"
Public gameType As String = "Unranked"
Sub New(gameParts() As String)
name = gameParts(0)
If gameParts(1) = 0 Then
status = "Hosting"
Else
status = "Dueling"
End If
If name.Substring(1, 1) = "0" Then
banlist = "TCG"
mode = "TCG/OCG"
ElseIf name.Substring(1, 1) = "1" Then
banlist = "OCG"
mode = "TCG/OCG"
ElseIf name.Substring(1, 1) = "2" Then
banlist = "Traditional"
mode = "TCG/OCG"
ElseIf name.Substring(1, 1) = "3" Then
banlist = "No Banlist"
mode = "TCG/OCG"
ElseIf name.Substring(1, 1) = "4" Then
banlist = "TCG"
mode = "TCG"
ElseIf name.Substring(1, 1) = "5" Then
banlist = "OCG"
mode = "TCG"
ElseIf name.Substring(1, 1) = "6" Then
banlist = "Traditional"
mode = "TCG"
ElseIf name.Substring(1, 1) = "7" Then
banlist = "No Banlist"
mode = "TCG"
ElseIf name.Substring(1, 1) = "8" Then
banlist = "TCG"
mode = "OCG"
ElseIf name.Substring(1, 1) = "9" Then
banlist = "OCG"
mode = "OCG"
ElseIf name.Substring(1, 1) = "A" Then
banlist = "Traditional"
mode = "OCG"
Else
banlist = "No Banlist"
mode = "OCG"
End If
If name.Substring(2, 1) = "0" Then
type = "Single"
ElseIf name.Substring(2, 1) = "1" Then
type = "Match"
Else
type = "Tag"
End If
If name.Substring(3, 1) = "1" Then
masterRules = "1"
ElseIf name.Substring(3, 1) = "2" Then
masterRules = "2"
ElseIf name.Substring(3, 1) = "3" Then
masterRules = "3"
ElseIf name.Substring(3, 1) = "4" Then
masterRules = "4"
Else
masterRules = "5"
End If
If name.Substring(0, 1) = "1" Then
gameType = "Ranked"
If name.Substring(1, 1) = "0" Then
mode = "TCG"
ElseIf name.Substring(1, 1) = "1" Then
mode = "OCG"
End If
ElseIf name.Substring(0, 1) = "2" Then
gameType = "Tournament"
ElseIf name.Substring(0, 1) = "4" Then
gameType = "Battle City"
ElseIf name.Substring(0, 1) = "5" Then
masterRules = "R"
gameType = "Rush"
banlist = "RUSH"
mode = "RUSH"
End If
If name.Length > 7 Then
If name(7) = "," Then
If name(4) = "1" Then
additionalRules = "Rules: Don't Check Deck"
ElseIf name(4) = "2" Then
additionalRules = "Rules: Don't Shuffle Deck"
ElseIf name(4) = "3" Then
additionalRules = "Rules: Don't Check Deck, Don't Shuffle Deck"
ElseIf name(4) = "4" Then
additionalRules = "Rules: 7 Minute Timer"
ElseIf name(4) = "5" Then
additionalRules = "Rules: Don't Check Deck, 7 Minute Timer"
ElseIf name(4) = "6" Then
additionalRules = "Rules: Don't Shuffle Deck, 7 Minute Timer"
ElseIf name(4) = "7" Then
additionalRules = "Rules: Don't Check Deck, Don't Shuffle Deck, 7 Minute Timer"
End If
End If
End If
host = gameParts(2)
players = gameParts(2)
Dim counter As Integer = 0
While counter < gameParts.Length
If counter > 2 Then
players = players & ", " & gameParts(counter)
End If
counter += 1
End While
End Sub
End Class