Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module globalvar
- Public grid(9, 9), XInput, OInput As String
- Public X, Y, PX, PY, Gridprop(9, 9), PYB, RANVal, CAHP, BSHP, CRHP, DEHP, SBHP, AllEShipHP, STP, XB, YB As Integer
- Public RAN As New Random
- Public KILLED, WON As Boolean
- Public Start As Boolean = True
- End Module
- Module Module1
- Sub initial()
- For i = 0 To 9
- For c = 0 To 9
- grid(i, c) = "≈"
- Next
- Next
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.WriteLine("
- __ __ _____ _____ _ ___ __ _ _ _ ___ __
- │ \/ \_ _│_ _│ │ │ __/' _/│ ││ │ │ _ \/' _/
- │ -< /\ ││ │ │ │ │ │_│ _|`._`.│ >< │ │ v_/`._`.
- │__/_||_││_│ │_│ │___│___│___/│_││_│_│_│ │___/
- ╞═══════════════════════════════════════════════╡")
- Console.ReadLine()
- Call Main()
- End Sub
- Sub Main()
- Console.Clear()
- If Start = True Then
- Start = False
- Call initial()
- Else
- Console.ForegroundColor = ConsoleColor.DarkGray
- Console.WriteLine("
- ╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗")
- For a = 0 To 9
- PY = a
- Console.Write(" ║")
- For b = 0 To 9
- PX = b
- If Gridprop(PX, PY) = 0 Then 'UW
- Console.ForegroundColor = ConsoleColor.DarkCyan
- ElseIf Gridprop(PX, PY) = 1 Then 'one of your ships destroyed cell
- Console.ForegroundColor = ConsoleColor.Red
- ElseIf Gridprop(PX, PY) = 2 Then 'Miss
- Console.ForegroundColor = ConsoleColor.Blue
- ElseIf Gridprop(PX, PY) = 3 Then 'SUB
- Console.ForegroundColor = ConsoleColor.Green
- ElseIf Gridprop(PX, PY) = 4 Then 'this indicates a UW cell that has an enemy ship in it
- Console.ForegroundColor = ConsoleColor.DarkCyan
- ElseIf Gridprop(PX, PY) = 5 Then 'this indicates a UW cell that the AI has had a miss shot in
- Console.ForegroundColor = ConsoleColor.DarkCyan
- ElseIf Gridprop(PX, PY) = 6 Then 'DES
- Console.ForegroundColor = ConsoleColor.Green
- ElseIf Gridprop(PX, PY) = 7 Then 'BAT
- Console.ForegroundColor = ConsoleColor.Green
- ElseIf Gridprop(PX, PY) = 8 Then 'CRU
- Console.ForegroundColor = ConsoleColor.Green
- ElseIf Gridprop(PX, PY) = 9 Then 'CAR
- Console.ForegroundColor = ConsoleColor.Green
- ElseIf Gridprop(PX, PY) = 10 Then 'HIT
- Console.ForegroundColor = ConsoleColor.Red
- End If
- If PX < 9 Then
- Console.Write(" " & grid(PX, PY))
- Console.ForegroundColor = ConsoleColor.DarkGray
- Console.Write(" ║")
- Else
- PYB = PY + 1
- Console.Write(" " & grid(PX, PY))
- Console.ForegroundColor = ConsoleColor.DarkGray
- Console.Write(" ║ ")
- Console.ForegroundColor = ConsoleColor.White
- Console.Write(PYB)
- If PY = 0 Then
- Console.ForegroundColor = ConsoleColor.DarkCyan
- Console.Write(" ≈")
- Console.ForegroundColor = ConsoleColor.White
- Console.Write(" = Undiscovered Water")
- ElseIf PY = 1 Then
- Console.ForegroundColor = ConsoleColor.Red
- Console.Write(" X")
- Console.ForegroundColor = ConsoleColor.White
- Console.Write(" = A Hit")
- ElseIf PY = 2 Then
- Console.ForegroundColor = ConsoleColor.Blue
- Console.Write(" o")
- Console.ForegroundColor = ConsoleColor.White
- Console.Write(" = A Miss")
- ElseIf PY = 3 Then
- Console.ForegroundColor = ConsoleColor.Green
- Console.Write(" «")
- Console.ForegroundColor = ConsoleColor.White
- Console.Write(" = A Ship")
- ElseIf PY = 4 Then
- Console.ForegroundColor = ConsoleColor.Red
- Console.Write(" «")
- Console.ForegroundColor = ConsoleColor.White
- Console.Write(" = Damaged Ship")
- ElseIf PY = 5 Then
- Console.Write(" Carrier HP: ")
- If CAHP = 5 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓▓▓▓")
- ElseIf CAHP = 4 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓▓▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓")
- ElseIf CAHP = 3 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓▓")
- ElseIf CAHP = 2 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓▓▓")
- ElseIf CAHP = 1 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓▓▓▓")
- Else
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write(" ▓▓▓▓▓")
- End If
- ElseIf PY = 6 Then
- Console.Write(" Battleship HP:")
- If BSHP = 4 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓▓▓")
- ElseIf BSHP = 3 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓")
- ElseIf BSHP = 2 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓▓")
- ElseIf BSHP = 1 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓▓▓")
- Else
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write(" ▓▓▓▓")
- End If
- ElseIf PY = 7 Then
- Console.Write(" Cruiser HP: ")
- If CRHP = 3 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓▓")
- ElseIf CRHP = 2 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓")
- ElseIf CRHP = 1 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓▓")
- Else
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write(" ▓▓▓")
- End If
- ElseIf PY = 8 Then
- Console.Write(" Destroyer HP: ")
- If DEHP = 2 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓▓")
- ElseIf DEHP = 1 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓")
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write("▓")
- Else
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write(" ▓▓")
- End If
- ElseIf PY = 9 Then
- Console.Write(" Submarine HP: ")
- If SBHP = 1 Then
- Console.ForegroundColor = ConsoleColor.DarkGreen
- Console.Write(" ▓")
- Else
- Console.ForegroundColor = ConsoleColor.DarkRed
- Console.Write(" ▓")
- End If
- End If
- Console.ForegroundColor = ConsoleColor.DarkGray
- End If
- Next
- If PY < 9 Then
- Console.WriteLine("
- ╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣")
- Else
- Console.WriteLine("
- ╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝")
- End If
- Next
- End If
- Console.ForegroundColor = ConsoleColor.White
- Console.WriteLine(" A B C D E F G H I J")
- If STP = 5 Then
- Call AIBplace()
- Else
- Call ShipPlaceChoice()
- End If
- End Sub
- Sub ShipPlaceChoice()
- If STP = 0 Then
- Console.WriteLine("
- Place your sub.")
- Console.WriteLine(" What column would you like to choose?")
- XInput = Console.ReadLine.ToLower()
- If XInput = "a" Then
- X = 0
- ElseIf XInput = "b" Then
- X = 1
- ElseIf XInput = "c" Then
- X = 2
- ElseIf XInput = "d" Then
- X = 3
- ElseIf XInput = "e" Then
- X = 4
- ElseIf XInput = "f" Then
- X = 5
- ElseIf XInput = "g" Then
- X = 6
- ElseIf XInput = "h" Then
- X = 7
- ElseIf XInput = "i" Then
- X = 8
- ElseIf XInput = "j" Then
- X = 9
- Else
- Console.WriteLine(" Invalid input.")
- Call ShipPlaceChoice()
- End If
- Console.WriteLine("
- What row would you like to choose?")
- Y = Console.ReadLine()
- If Y > 10 Then
- Y = 10
- ElseIf Y < 1 Then
- Y = 1
- End If
- Y = Y - 1
- If grid(X, Y) = "«" Then
- Console.WriteLine(" You have already placed a Ship in that cell.")
- Call ShipPlaceChoice()
- Else
- STP = 1
- Gridprop(X, Y) = 3
- grid(X, Y) = "«"
- End If
- SBHP = 1
- ElseIf STP = 1 Then
- Console.WriteLine("
- Place Your Destroyer.")
- Console.WriteLine(" What orientation is the ship verticle or horizontal? (H/V)")
- OInput = Console.ReadLine.ToLower()
- Console.WriteLine(" What column would you like to choose?")
- XInput = Console.ReadLine.ToLower()
- If XInput = "a" Then
- X = 0
- ElseIf XInput = "b" Then
- X = 1
- ElseIf XInput = "c" Then
- X = 2
- ElseIf XInput = "d" Then
- X = 3
- ElseIf XInput = "e" Then
- X = 4
- ElseIf XInput = "f" Then
- X = 5
- ElseIf XInput = "g" Then
- X = 6
- ElseIf XInput = "h" Then
- X = 7
- ElseIf XInput = "i" Then
- X = 8
- ElseIf XInput = "j" Then
- X = 9
- Else
- Console.WriteLine(" Invalid input.")
- Call ShipPlaceChoice()
- End If
- Console.WriteLine("
- What row would you like to choose?")
- Y = Console.ReadLine()
- If Y > 10 Then
- Y = 10
- ElseIf Y < 1 Then
- Y = 1
- End If
- Y = Y - 1
- If OInput = "h" Then
- If X = 0 Or 1 Then
- XB = X + 1
- If Gridprop(XB, Y) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 6
- Gridprop(XB, Y) = 6
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- STP = 2
- End If
- Else
- XB = X - 1
- Gridprop(X, Y) = 6
- Gridprop(XB, Y) = 6
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- STP = 2
- End If
- Else
- If Y = 0 Then
- YB = Y + 1
- If Gridprop(X, YB) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 6
- Gridprop(X, YB) = 6
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- STP = 2
- End If
- Else
- YB = Y - 1
- Gridprop(X, Y) = 6
- Gridprop(X, YB) = 6
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- STP = 2
- End If
- End If
- DEHP = 2
- ElseIf STP = 2 Then
- Console.WriteLine("
- Place Your Cruiser.")
- Console.WriteLine(" What orientation is the ship verticle or horizontal? (H/V)")
- OInput = Console.ReadLine.ToLower()
- Console.WriteLine(" What column would you like to choose?")
- XInput = Console.ReadLine.ToLower()
- If XInput = "a" Then
- X = 0
- ElseIf XInput = "b" Then
- X = 1
- ElseIf XInput = "c" Then
- X = 2
- ElseIf XInput = "d" Then
- X = 3
- ElseIf XInput = "e" Then
- X = 4
- ElseIf XInput = "f" Then
- X = 5
- ElseIf XInput = "g" Then
- X = 6
- ElseIf XInput = "h" Then
- X = 7
- ElseIf XInput = "i" Then
- X = 8
- ElseIf XInput = "j" Then
- X = 9
- Else
- Console.WriteLine(" Invalid input.")
- Call ShipPlaceChoice()
- End If
- Console.WriteLine("
- What row would you like to choose?")
- Y = Console.ReadLine()
- If Y > 10 Then
- Y = 10
- ElseIf Y < 1 Then
- Y = 1
- End If
- Y = Y - 1
- If OInput = "h" Then
- If X = 0 Then
- XB = X + 1
- If Gridprop(XB, Y) = 3 Or Gridprop(XB + 1, Y) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 7
- Gridprop(XB, Y) = 7
- Gridprop(XB + 1, Y) = 7
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- grid(XB + 1, Y) = "«"
- STP = 3
- End If
- Else
- XB = X - 1
- Gridprop(X, Y) = 7
- Gridprop(XB, Y) = 7
- Gridprop(XB - 1, Y) = 7
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- grid(XB - 1, Y) = "«"
- STP = 3
- End If
- Else
- If Y = 0 Then
- YB = Y + 1
- If Gridprop(X, YB) = 3 Or Gridprop(X, YB + 1) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 7
- Gridprop(X, YB) = 7
- Gridprop(X, YB + 1) = 7
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- grid(X, YB + 1) = "«"
- STP = 3
- End If
- Else
- YB = Y - 1
- Gridprop(X, Y) = 7
- Gridprop(X, YB) = 7
- Gridprop(X, YB - 1) = 7
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- grid(X, YB - 1) = "«"
- STP = 3
- End If
- End If
- CRHP = 3
- ElseIf STP = 3 Then
- Console.WriteLine("
- Place Your Battleship.")
- Console.WriteLine(" What orientation is the ship verticle or horizontal? (H/V)")
- OInput = Console.ReadLine.ToLower()
- Console.WriteLine(" What column would you like to choose?")
- XInput = Console.ReadLine.ToLower()
- If XInput = "a" Then
- X = 0
- ElseIf XInput = "b" Then
- X = 1
- ElseIf XInput = "c" Then
- X = 2
- ElseIf XInput = "d" Then
- X = 3
- ElseIf XInput = "e" Then
- X = 4
- ElseIf XInput = "f" Then
- X = 5
- ElseIf XInput = "g" Then
- X = 6
- ElseIf XInput = "h" Then
- X = 7
- ElseIf XInput = "i" Then
- X = 8
- ElseIf XInput = "j" Then
- X = 9
- Else
- Console.WriteLine(" Invalid input.")
- Call ShipPlaceChoice()
- End If
- Console.WriteLine("
- What row would you like to choose?")
- Y = Console.ReadLine()
- If Y > 10 Then
- Y = 10
- ElseIf Y < 1 Then
- Y = 1
- End If
- Y = Y - 1
- If OInput = "h" Then
- If X = 0 Then
- XB = X + 1
- If Gridprop(XB, Y) = 3 Or Gridprop(XB + 1, Y) = 3 Or Gridprop(XB + 2, Y) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 8
- Gridprop(XB, Y) = 8
- Gridprop(XB + 1, Y) = 8
- Gridprop(XB + 2, Y) = 8
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- grid(XB + 1, Y) = "«"
- grid(XB + 2, Y) = "«"
- STP = 4
- End If
- Else
- XB = X - 1
- Gridprop(X, Y) = 8
- Gridprop(XB, Y) = 8
- Gridprop(XB - 1, Y) = 8
- Gridprop(XB - 2, Y) = 8
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- grid(XB - 1, Y) = "«"
- grid(XB - 2, Y) = "«"
- STP = 4
- End If
- Else
- If Y = 0 Then
- YB = Y + 1
- If Gridprop(X, YB) = 3 Or Gridprop(X, YB + 1) = 3 Or Gridprop(X, YB + 2) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 8
- Gridprop(X, YB) = 8
- Gridprop(X, YB + 1) = 8
- Gridprop(X, YB + 2) = 8
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- grid(X, YB + 1) = "«"
- grid(X, YB + 2) = "«"
- STP = 4
- End If
- Else
- YB = Y - 1
- Gridprop(X, Y) = 8
- Gridprop(X, YB) = 8
- Gridprop(X, YB - 1) = 8
- Gridprop(X, YB - 2) = 8
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- grid(X, YB - 1) = "«"
- grid(X, YB - 2) = "«"
- STP = 4
- End If
- End If
- BSHP = 4
- ElseIf STP = 4 Then
- Console.WriteLine("
- Place Your Carrier.")
- Console.WriteLine(" What orientation is the ship verticle or horizontal? (H/V)")
- OInput = Console.ReadLine.ToLower()
- Console.WriteLine(" What collum would you like to choose?")
- XInput = Console.ReadLine.ToLower()
- If XInput = "a" Then
- X = 0
- ElseIf XInput = "b" Then
- X = 1
- ElseIf XInput = "c" Then
- X = 2
- ElseIf XInput = "d" Then
- X = 3
- ElseIf XInput = "e" Then
- X = 4
- ElseIf XInput = "f" Then
- X = 5
- ElseIf XInput = "g" Then
- X = 6
- ElseIf XInput = "h" Then
- X = 7
- ElseIf XInput = "i" Then
- X = 8
- ElseIf XInput = "j" Then
- X = 9
- Else
- Console.WriteLine(" Invalid input.")
- Call ShipPlaceChoice()
- End If
- Console.WriteLine("
- What row would you like to choose?")
- Y = Console.ReadLine()
- If Y > 10 Then
- Y = 10
- ElseIf Y < 1 Then
- Y = 1
- End If
- Y = Y - 1
- If OInput = "h" Then
- If X = 0 Then
- XB = X + 1
- If Gridprop(XB, Y) = 3 Or Gridprop(XB + 1, Y) = 3 Or Gridprop(XB + 2, Y) = 3 Or Gridprop(XB + 3, Y) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 9
- Gridprop(XB, Y) = 9
- Gridprop(XB + 1, Y) = 9
- Gridprop(XB + 2, Y) = 9
- Gridprop(XB + 3, Y) = 9
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- grid(XB + 1, Y) = "«"
- grid(XB + 2, Y) = "«"
- grid(XB + 2, Y) = "«"
- STP = 5
- End If
- Else
- XB = X - 1
- Gridprop(X, Y) = 9
- Gridprop(XB, Y) = 9
- Gridprop(XB - 1, Y) = 9
- Gridprop(XB - 2, Y) = 9
- Gridprop(XB - 3, Y) = 9
- grid(X, Y) = "«"
- grid(XB, Y) = "«"
- grid(XB - 1, Y) = "«"
- grid(XB - 2, Y) = "«"
- grid(XB - 3, Y) = "«"
- STP = 5
- End If
- Else
- If Y = 0 Then
- YB = Y + 1
- If Gridprop(X, YB) = 3 Or Gridprop(X, YB + 1) = 3 Or Gridprop(X, YB + 2) = 3 Or Gridprop(X, YB + 3) = 3 Then
- Console.WriteLine(" You have already placed a ship there.")
- Call ShipPlaceChoice()
- Else
- Gridprop(X, Y) = 9
- Gridprop(X, YB) = 9
- Gridprop(X, YB + 1) = 9
- Gridprop(X, YB + 2) = 9
- Gridprop(X, YB + 3) = 9
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- grid(X, YB + 1) = "«"
- grid(X, YB + 2) = "«"
- grid(X, YB + 3) = "«"
- STP = 5
- End If
- Else
- YB = Y - 1
- Gridprop(X, Y) = 9
- Gridprop(X, YB) = 9
- Gridprop(X, YB - 1) = 9
- Gridprop(X, YB - 2) = 9
- Gridprop(X, YB - 3) = 9
- grid(X, Y) = "«"
- grid(X, YB) = "«"
- grid(X, YB - 1) = "«"
- grid(X, YB - 2) = "«"
- grid(X, YB - 3) = "«"
- STP = 5
- End If
- End If
- CAHP = 5
- End If
- Call Main()
- End Sub
- Sub AIBplace()
- X = RAN.Next(0, 9)
- Y = RAN.Next(0, 9)
- Console.WriteLine(X & " X")
- Console.WriteLine(Y & " Y")
- Console.ReadLine()
- End Sub
- Sub Battle()
- Console.WriteLine("Battle!")
- Console.WriteLine(" What collum would you like to choose?")
- XInput = Console.ReadLine.ToLower()
- If XInput = "a" Then
- X = 0
- ElseIf XInput = "b" Then
- X = 1
- ElseIf XInput = "c" Then
- X = 2
- ElseIf XInput = "d" Then
- X = 3
- ElseIf XInput = "e" Then
- X = 4
- ElseIf XInput = "f" Then
- X = 5
- ElseIf XInput = "g" Then
- X = 6
- ElseIf XInput = "h" Then
- X = 7
- ElseIf XInput = "i" Then
- X = 8
- ElseIf XInput = "j" Then
- X = 9
- Else
- Console.WriteLine(" Invalid input.")
- Call ShipPlaceChoice()
- End If
- Console.WriteLine("
- What row would you like to choose?")
- Y = Console.ReadLine()
- If Y > 10 Then
- Y = 10
- ElseIf Y < 1 Then
- Y = 1
- End If
- Y = Y - 1
- If Gridprop(X, Y) = 0 Then
- Gridprop(X, Y) = 2
- grid(X, Y) = "o"
- ElseIf Gridprop(X, Y) = 1 Then
- Console.WriteLine(" That is where one of your ships lay in ruins not a target.")
- Console.ReadLine()
- Call Battle()
- ElseIf Gridprop(X, Y) = 2 Then
- Console.WriteLine(" You have already attacked this cell.")
- Console.ReadLine()
- Call Battle()
- ElseIf Gridprop(X, Y) = 3 Then
- Console.WriteLine(" *REMOVE FEATURE AFTER TESTING* your sub is hit.")
- Console.ReadLine()
- Gridprop(X, Y) = 1
- SBHP = 0
- ElseIf Gridprop(X, Y) = 4 Then
- Console.WriteLine("HIT!")
- Console.ReadLine()
- Gridprop(X, Y) = 10
- AllEShipHP = AllEShipHP - 1
- ElseIf Gridprop(X, Y) = 5 Then
- Console.WriteLine(" *REMOVE FEATURE AFTER TESTING* your Destroyer is hit.")
- Console.ReadLine()
- Gridprop(X, Y) = 1
- DEHP = DEHP - 1
- End If
- Call Main()
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement