Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Barragoon Board Game
#1
Quote:Hello All,

Barragoon is a 2 player board game. This is a very complex game and you will need to read the all the rules carefully. I have included a copy of the rules.

Hope you enjoy playing.

Donald

   


.pdf   Barragoon Rules.pdf (Size: 2.94 MB / Downloads: 58)

Code: (Select All)
_TITLE "Barragoon by Robert Witter and Frank Warneke - Programmed by Donald L. Foster Jr. 2017"

_Limit 50

Screen _NewImage(1210, 737, 256)

_PaletteColor 2, _RGB32(89, 19, 0) ' Board Seporator
_PaletteColor 3, _RGB32(225, 201, 165) ' Board Light Square
_PaletteColor 4, _RGB32(192, 154, 105) ' Board Dark Square
_PaletteColor 5, _RGB32(100, 100, 100) ' Barragon Top
_PaletteColor 6, _RGB32(135, 111, 75) ' Barragoon Sides
_PaletteColor 7, _RGB32(255, 255, 255) ' White Tile Top
_PaletteColor 8, _RGB32(115, 85, 55) ' White Tile Side
_PaletteColor 9, _RGB32(190, 85, 10) ' Brown Tile Top
_PaletteColor 10, _RGB32(255, 0, 0) ' Brown Tile Side

Player = 1: Opponant = 2

Tiles(1) = 7: Tiles(2) = 7
Barragoon(1, 5) = 1: Barragoon(2, 4) = 1: Barragoon(2, 6) = 1: Barragoon(3, 5) = 1: Barragoon(5, 5) = 1: Barragoon(6, 4) = 1: Barragoon(6, 6) = 1: Barragoon(7, 5) = 1
Rotation(1, 5) = 1: Rotation(2, 4) = 1: Rotation(2, 6) = 1: Rotation(3, 5) = 1: Rotation(5, 5) = 1: Rotation(6, 4) = 1: Rotation(6, 6) = 1: Rotation(7, 5) = 1
Rotate(1) = 1: Rotate(2) = 4: Rotate(3) = 2: Rotate(4) = 4: Rotate(5) = 4: Rotate(6) = 1
TileColor(2, 1) = 1: TileColor(3, 1) = 1: TileColor(3, 2) = 1: TileColor(4, 2) = 1: TileColor(5, 1) = 1: TileColor(5, 2) = 1: TileColor(6, 1) = 1
TileColor(2, 9) = 2: TileColor(3, 8) = 2: TileColor(3, 9) = 2: TileColor(4, 8) = 2: TileColor(5, 9) = 2: TileColor(5, 8) = 2: TileColor(6, 9) = 2
TilePiece(2, 1) = 4: TilePiece(3, 1) = 3: TilePiece(3, 2) = 2: TilePiece(4, 2) = 3: TilePiece(5, 1) = 3: TilePiece(5, 2) = 2: TilePiece(6, 1) = 4
TilePiece(2, 9) = 4: TilePiece(3, 9) = 3: TilePiece(3, 8) = 2: TilePiece(4, 8) = 3: TilePiece(5, 9) = 3: TilePiece(5, 8) = 2: TilePiece(6, 9) = 4

Arrow$ = "BH4BU2BL1C15E1U8R2H4G4R2D7L7U2G4F4U2R8E1BH1P15,15BF7"
Barragoon$(1, 1) = "BL3C15H12E4F11E11F4G11F11G4H11G11H4E11BR5P15,15"
Barragoon$(2, 1) = "BD16C15L3U25L6E9F9L6D25L4BU5P15,15"
Barragoon$(2, 2) = "BL16C15U3R25U6F9G9U6L25U4BR5P15,15"
Barragoon$(2, 3) = "BU16C15R3D25R6G9H9R6U25R4BD5P15,15"
Barragoon$(2, 4) = "BR16C15D3L25D6H9E9D6R25D4BL5P15,15"
Barragoon$(3, 2) = "BL3C15U8L6E9F9L6D16R6G9H9R6U8BR3P15,15"
Barragoon$(3, 1) = "BU3C15R8U6F9G9U6L16D6H9E9D6R8BD3P15,15"
Barragoon$(4, 1) = "BL6BU3C15R12D6E9H9D6L18D24R6U18BU3P15,15"
Barragoon$(4, 2) = "BU6BR3C15D12L6F9E9L6U18L24D6R18BR3P15,15"
Barragoon$(4, 3) = "BR6BD3C15L12U6G9F9U6R18U24L6D18BD3P15,15"
Barragoon$(4, 4) = "BD6BL3C15U12R6H9G9R6D18R24U6L18BL3P15,15"
Barragoon$(5, 1) = "BR6BU3C15L12D6H9E9D6R18D24L6U18BU3P15,15"
Barragoon$(5, 2) = "BU6BL3C15D12R6G9H9R6U18R24D6L18BL3P15,15"
Barragoon$(5, 3) = "BD3BL6C15R12U6F9G9U6L18U24R6D18BD3P15,15"
Barragoon$(5, 4) = "BD6BR3C15U12L6E9F9L6D18L24U6R18BR3P15,15"
Barragoon$(6, 1) = "TA0" + Arrow$ + "TA90" + Arrow$ + "TA180" + Arrow$ + "TA270" + Arrow$
YesNo$(1) = "Yes": YesNo$(2) = " No "

' Setup Background
Line (0, 0)-(1210, 737), 1, BF
Color 15, 1: Locate 2, 122: Print "B A R R A G O O N";

' Setup Instruction Button
Line (1005, 695)-(1130, 725), 15, BF
Color 0, 15: Locate 45, 129: Print "Game Rules";

' Draw Board
Line (11, 11)-(917, 725), 3, BF: Line (29, 29)-(899, 707), 2, BF
X = 0
For Z = 1 To 7
V = 0
For Y = 1 To 9
If (Z + Y) / 2 = Fix((Z + Y) / 2) Then U = 4 Else U = 3
Line (80 - 46 + V, 80 - 46 + X)-(80 + 46 + V, 80 + 46 + X), U, BF
If TilePiece(Z, Y) > 0 Then X1 = 80 + V: X2 = 80 + X: X3 = TileColor(Z, Y): X4 = TilePiece(Z, Y): X5 = U: GoSub DrawTile
If Barragoon(Z, Y) > 0 Then X1 = 80 + V: X2 = 80 + X: X3 = Barragoon(Z, Y): X4 = Rotation(Z, Y): GoSub DrawBarragoon
BoardX(Z, Y) = 80 + V: BoardY(Z, Y) = 80 + X
V = V + 96
Next
X = X + 96
Next

' Ask if players want alternative setup for Barragoon pieces.
Color 15, 1: Locate 13, 125: Print "Alternative Setup?";

' Setup Yes and No Buttons.
X = 0: V = 0
For Z = 1 To 2
Line (1005, 280 + X)-(1130, 310 + X), 15, BF
Color 0, 15: Locate 19 + V, 133: Print YesNo$(Z);
VariationY(Z) = 280 + X
X = X + 80: V = V + 5
Next

' Get Mouse Input for Buttons and Game Rules Button.
AlternativeSetup:
Do While _MouseInput
MouseX = _MouseX: MouseY = _MouseY: MouseLeftButton = _MouseButton(1)
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > 695) * (MouseY < 725) Then GoSub ReleaseMouseButton: Shell "Barragoon Rules.pdf"
For Z = 1 To 2
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > VariationY(Z) - 1) * (MouseY < VariationY(Z) + 31) Then Alternative = Z: GoTo EndChoice1
Next
Loop
GoTo AlternativeSetup

EndChoice1:
Line (1005, 280)-(1130, 390), 1, BF

' If Alternative Setup, change Barragoons to All Turn.
If Alternative = 1 Then
For Z = 1 To 7
For Y = 1 To 9
If Barragoon(Z, Y) = 1 Then Barragoon(Z, Y) = 6: X1 = BoardX(Z, Y): X2 = BoardY(Z, Y): X3 = 6: X4 = 1: GoSub DrawBarragoon
Next
Next
End If

StartGame:
' Draw Player Indicator
X1 = 1067: X2 = 100: X3 = Player: X4 = 2: X5 = 1: GoSub DrawTile
Color 15, 1: Locate 10, 130: Print "Player:"; Player;

' Check for Can't Play
X = 0
For Z = 1 To 7
For Y = 1 To 9
If TileColor(Z, Y) = Player Then X1 = Z: X2 = Y: Piece = TilePiece(Z, Y): On Piece GOSUB Piece1, Piece2, Piece3, Piece4
Next
Next

' Player Has No Playable Moves, Declare Opponant Winner
If X = 0 Then
Color 15, 1: Locate 13, 121: Print " You Have No Legal Moves ";
Color 15, 1: Locate 15, 121: Print " Press <ENTER> To Continue ";
GetENTER: A$ = InKey$: If A$ = "" GoTo GetENTER
If Asc(A$) <> 13 GoTo GetENTER
Winner = Opponant: GoTo Winner
End If

' Set All Playable Locations to 0
For Z = 1 To 7: For Y = 1 To 9: Playable(Z, Y) = 0: Next: Next

Capture = 0: Barragoon = 0

Color 15, 1: Locate 13, 121: Print " Choose A Piece To Move ";

' Get Choose a Piece to Move Mouse Input and Game Rules Button.
ChooseAPieceMouseInput:
Do While _MouseInput
MouseX = _MouseX: MouseY = _MouseY: MouseLeftButton = _MouseButton(1)
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > 695) * (MouseY < 725) Then GoSub ReleaseMouseButton: Shell "Barragoon Rules.pdf"
For Z = 1 To 7
For Y = 1 To 9
If (MouseLeftButton = -1) * (MouseX > BoardX(Z, Y) - 47) * (MouseX < BoardX(Z, Y) + 47) * (MouseY > BoardY(Z, Y) - 47) * (MouseY < BoardY(Z, Y) + 47) Then
If TileColor(Z, Y) = Player Then Row1 = Z: Column1 = Y: Piece = TilePiece(Z, Y): GoTo EndChoice2
End If
Next
Next
Loop
GoTo ChooseAPieceMouseInput

EndChoice2:

' Check for Playable Moves
X = 0: X1 = Row1: X2 = Column1: On Piece GOSUB Piece1, Piece2, Piece3, Piece4

' Is Move Playable?
If X = 0 GoTo ChooseAPieceMouseInput

' Highlight Selected Square
Paint (BoardX(Row1, Column1), BoardY(Row1, Column1) + 40), 6, 2

' Highlight Playable Squares
For Z = 1 To 7
For Y = 1 To 9
If Playable(Z, Y) = 1 Then Paint (BoardX(Z, Y), BoardY(Z, Y) + 40), 8, 2
Next
Next

Color 15, 1: Locate 13, 121: Print "Choose A Location To Move To";

' Get Choose a Piece to Move Mouse Input and Game Rules Button.
ChooseALocationMouseInput:
Do While _MouseInput
MouseX = _MouseX: MouseY = _MouseY: MouseLeftButton = _MouseButton(1)
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > 695) * (MouseY < 725) Then GoSub ReleaseMouseButton: Shell "Barragoon Rules.pdf"
For Z = 1 To 7
For Y = 1 To 9
If (MouseLeftButton = -1) * (MouseX > BoardX(Z, Y) - 47) * (MouseX < BoardX(Z, Y) + 47) * (MouseY > BoardY(Z, Y) - 47) * (MouseY < BoardY(Z, Y) + 47) Then
If Playable(Z, Y) = 1 Then Row2 = Z: Column2 = Y: GoTo EndChoice3
End If
Next
Next
Loop
GoTo ChooseALocationMouseInput

EndChoice3:

' Remove Playable Squares
For Z = 1 To 7
For Y = 1 To 9
If (Z + Y) / 2 = Fix((Z + Y) / 2) Then U = 4 Else U = 3
If Playable(Z, Y) = 1 Then Playable(Z, Y) = 0: Paint (BoardX(Z, Y), BoardY(Z, Y) + 40), U, 2
Next
Next

' Remove Selected Piece
If (Row1 + Column1) / 2 = Fix((Row1 + Column1) / 2) Then U = 4 Else U = 3
Line (BoardX(Row1, Column1) - 46, BoardY(Row1, Column1) - 46)-(BoardX(Row1, Column1) + 46, BoardY(Row1, Column1) + 46), U, BF

' Check for Capture or Barragoon at New Square
If TileColor(Row2, Column2) = Opponant Then Capture = 1: Tiles(Opponant) = Tiles(Opponant) - 1
If Barragoon(Row2, Column2) > 0 Then Barragoon = 1

' Move Piece to New Square
TileColor(Row2, Column2) = Player: TilePiece(Row2, Column2) = Piece
Barragoon(Row2, Column2) = 0: Rotation(Row2, Column2) = 0
TileColor(Row1, Column1) = 0: TilePiece(Row1, Column1) = 0

' Draw Player's Tile at New Square
If (Row2 + Column2) / 2 = Fix((Row2 + Column2) / 2) Then X5 = 4 Else X5 = 3
X1 = BoardX(Row2, Column2): X2 = BoardY(Row2, Column2): X3 = Player: X4 = Piece: GoSub DrawTile

' Check for Barragoon Placement
BarragoonPlayer = 0
If Barragoon = 1 Then BarragoonPlayer = Player
If Capture = 1 Then BarragoonPlayer = Opponant

' No Barragoons Needs to be Placed
If BarragoonPlayer = 0 GoTo CheckWinner

ChooseBarragoonPiece:

' Draw Player Indicator
X1 = 1067: X2 = 100: X3 = BarragoonPlayer: X4 = 2: X5 = 1: GoSub DrawTile
Color 15, 1: Locate 10, 130: Print "Player:"; BarragoonPlayer;

Color 15, 1: Locate 13, 121: Print " Choose A Barragoon ";

' Draw Barragoon List
W = 0
For Z = 1 To 6
X1 = 1067: X2 = 250 + W: X3 = Z: X4 = 1: X5 = 1: GoSub DrawBarragoon
BarragoonY(Z) = 250 + W: W = W + 80
Next

' Get Barragoon Piece Input
ChooseBarragoonMouseInput:
Do While _MouseInput
MouseX = _MouseX: MouseY = _MouseY: MouseLeftButton = _MouseButton(1)
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > 695) * (MouseY < 725) Then GoSub ReleaseMouseButton: Shell "Barragoon Rules.pdf"
For Z = 1 To 6
If (MouseX > 1032) * (MouseX < 1102) * (MouseY > BarragoonY(Z) - 35) * (MouseY < BarragoonY(Z) + 35) Then
CanSelect = 1: Line (1032, BarragoonY(Z) - 35)-(1102, BarragoonY(Z) + 35), 15, B
Else
CanSelect = 0: Line (1032, BarragoonY(Z) - 35)-(1102, BarragoonY(Z) + 35), 1, B
End If
If (MouseLeftButton = -1) * (CanSelect = 1) Then BarragoonPiece = Z: GoSub ReleaseMouseButton: GoTo EndChoice4
Next
Loop
GoTo ChooseBarragoonMouseInput

EndChoice4:

' Skip Get Rotation if Barragoon only has 1 Rotation
If Rotate(BarragoonPiece) = 1 Then BarragoonRotation = 1: GoTo ChooseLocation

' Remove Barragoon Pieces List
Line (1032, 215)-(1102, 685), 1, BF

Color 15, 1: Locate 13, 121: Print " Choose A Rotation ";

' Draw Barragoon Rotations
W = 0
For Z = 1 To Rotate(BarragoonPiece)
X1 = 1067: X2 = 250 + W: X3 = BarragoonPiece: X4 = Z: X5 = 1: GoSub DrawBarragoon
BarragoonY(Z) = 250 + W: W = W + 80
Next

' Get Barragoon Rotation Input
ChooseRotationMouseInput:
Do While _MouseInput
MouseX = _MouseX: MouseY = _MouseY: MouseLeftButton = _MouseButton(1)
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > 695) * (MouseY < 725) Then GoSub ReleaseMouseButton: Shell "Barragoon Rules.pdf"
For Z = 1 To Rotate(BarragoonPiece)
If (MouseX > 1032) * (MouseX < 1102) * (MouseY > BarragoonY(Z) - 35) * (MouseY < BarragoonY(Z) + 35) Then
CanSelect = 1: Line (1032, BarragoonY(Z) - 35)-(1102, BarragoonY(Z) + 35), 15, B
Else
CanSelect = 0: Line (1032, BarragoonY(Z) - 35)-(1102, BarragoonY(Z) + 35), 1, B
End If
If (MouseLeftButton = -1) * (CanSelect = 1) Then BarragoonRotation = Z: GoSub ReleaseMouseButton: GoTo EndChoice5
Next
Loop
GoTo ChooseRotationMouseInput

EndChoice5:

ChooseLocation:
Color 15, 1: Locate 13, 121: Print " Choose A Location ";

' Get Choose a Piece to Move Mouse Input and Game Rules Button.
ChooseALocationMouseInput2:
Do While _MouseInput
MouseX = _MouseX: MouseY = _MouseY: MouseLeftButton = _MouseButton(1)
If (MouseLeftButton = -1) * (MouseX > 1005) * (MouseX < 1130) * (MouseY > 695) * (MouseY < 725) Then GoSub ReleaseMouseButton: Shell "Barragoon Rules.pdf"
For Z = 1 To 7
For Y = 1 To 9
If (MouseLeftButton = -1) * (MouseX > BoardX(Z, Y) - 47) * (MouseX < BoardX(Z, Y) + 47) * (MouseY > BoardY(Z, Y) - 47) * (MouseY < BoardY(Z, Y) + 47) Then
If (TileColor(Z, Y) = 0) * (Barragoon(Z, Y) = 0) Then Row2 = Z: Column2 = Y: Selected = 1: GoTo EndChoice6
End If
Next
Next
Loop
GoTo ChooseALocationMouseInput2

EndChoice6:
Line (1032, 215)-(1102, 685), 1, BF

' Place Barragoon on the Board
Barragoon(Row2, Column2) = BarragoonPiece: Rotation(Row2, Column2) = BarragoonRotation

' Draw Barragoon
X1 = BoardX(Row2, Column2): X2 = BoardY(Row2, Column2): X3 = BarragoonPiece: X4 = BarragoonRotation: GoSub DrawBarragoon

' If Opponant Placed a Barragoon, Go Back so Player Can Place Barragoon
If BarragoonPlayer = Opponant Then BarragoonPlayer = Player: GoTo ChooseBarragoonPiece

CheckWinner:
' Declare Player Winner if Opponant Has No Tiles Left
If Tiles(Opponant) = 0 Then Winner = Player: GoTo Winner

Swap Player, Opponant: GoTo StartGame


ReleaseMouseButton:
Do While _MouseInput
If _MouseButton(1) = 0 Then Return
Loop
GoTo ReleaseMouseButton


DrawTile:
Line (X1 - 40, X2 - 40)-(X1 + 40, X2 + 40), X5, BF
If X3 = 1 Then X5 = 7: X6 = 0 Else X5 = 9: X6 = 15
Circle (X1, X2), 35, 2: Paint (X1, X2), X5, 2
If (X4 = 2) + (X4 = 4) Then Circle (X1 - 12, X2 - 12), 6, X6: Paint (X1 - 12, X2 - 12), X6: Circle (X1 + 12, X2 + 12), 6, X6: Paint (X1 + 12, X2 + 12), X6
If (X4 = 4) + ((X4 = 3) * (X3 = 1)) Then Circle (X1 - 12, X2 - 12), 6, X6: Paint (X1 - 12, X2 - 12), X6: Circle (X1 - 12, X2 + 12), 6, X6: Paint (X1 - 12, X2 + 12), X6
If (X4 = 4) + ((X4 = 3) * (X3 = 2)) Then Circle (X1 + 12, X2 - 12), 6, X6: Paint (X1 + 12, X2 - 12), X6: Circle (X1 + 12, X2 + 12), 6, X6: Paint (X1 + 12, X2 + 10), X6
If (X4 = 3) * (X3 = 1) Then Circle (X1 + 12, X2), 6, X6: Paint (X1 + 12, X2), X6 Else If X4 = 3 Then Circle (X1 - 12, X2), 6, X6: Paint (X1 - 12, X2), X6
If X4 = 2 Then PSet (X1 - 12, X2 - 12), X6: Draw "TA0E1F25G3H25E2": Paint (X1, X2), X6
If (X4 = 4) + ((X4 = 3) * (X3 = 1)) Then Line (X1 - 13, X2 - 12)-(X1 - 10, X2 + 12), X6, BF
If (X4 = 4) + ((X4 = 3) * (X3 = 2)) Then Line (X1 + 13, X2 - 12)-(X1 + 10, X2 + 12), X6, BF
If (X4 = 3) * (X3 = 1) Then
Line (X1 - 10, X2 - 12)-(X1 + 12, X2 - 2), X6: Line (X1 - 12, X2 - 10)-(X1 + 12, X2 + 2), X6: Paint (X1, X2 - 6), X6
Line (X1 - 10, X2 + 12)-(X1 + 12, X2 + 2), X6: Line (X1 - 12, X2 + 10)-(X1 + 12, X2 - 2), X6: Paint (X1, X2 + 6), X6
End If
If (X4 = 3) * (X3 = 2) Then
Line (X1 + 10, X2 - 12)-(X1 - 12, X2 - 2), X6: Line (X1 + 12, X2 - 10)-(X1 - 12, X2 + 2), X6: Paint (X1, X2 - 6), X6
Line (X1 + 10, X2 + 12)-(X1 - 12, X2 + 2), X6: Line (X1 + 12, X2 + 10)-(X1 - 12, X2 - 2), X6: Paint (X1, X2 + 6), X6
End If
If X4 = 4 Then Line (X1 - 12, X2 - 13)-(X1 + 12, X2 - 10), X6, BF: Line (X1 - 12, X2 + 13)-(X1 + 12, X2 + 10), X6, BF
Return


DrawBarragoon:
Line (X1 - 25, X2 - 25)-(X1 + 25, X2 + 25), 2, B: Paint (X1, X2), 0, 2: PSet (X1, X2), 0: Draw Barragoon$(X3, X4): Return


Piece1: Return

Piece2: GoSub Start1Space: Return

Piece3: GoSub Start1Space: GoSub Start2Spaces: Return

Piece4: GoSub Start1Space: GoSub Start2Spaces: GoSub Start3Spaces: Return


Start1Space:
' 1 Start Up Direction
If X1 - 1 >= 1 Then
If (TileColor(X1 - 1, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 5) * (Rotation(X1 - 1, X2) = 1)) + (Barragoon(X1 - 1, X2) = 6)) Then Y1 = X1 - 1: Y2 = X2: Moves = 1: V = 0: GoSub CheckLeft
If (TileColor(X1 - 1, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) Then Y1 = X1 - 1: Y2 = X2: Moves = 1: V = 0: GoSub CheckUp
If (TileColor(X1 - 1, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 4) * (Rotation(X1 - 1, X2) = 1)) + (Barragoon(X1 - 1, X2) = 6)) Then Y1 = X1 - 1: Y2 = X2: Moves = 1: V = 0: GoSub CheckRight
End If

' 1 Start Right Direction
If X2 + 1 <= 9 Then
If (TileColor(X1, X2 + 1) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 4) * (Rotation(X1, X2 + 1) = 2)) + (Barragoon(X1, X2 + 1) = 6)) Then Y1 = X1: Y2 = X2 + 1: Moves = 1: V = 0: GoSub CheckDown
If (TileColor(X1, X2 + 1) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 5) * (Rotation(X1, X2 + 1) = 2)) + (Barragoon(X1, X2 + 1) = 6)) Then Y1 = X1: Y2 = X2 + 1: Moves = 1: V = 0: GoSub CheckUp
If (TileColor(X1, X2 + 1) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) Then Y1 = X1: Y2 = X2 + 1: Moves = 1: V = 0: GoSub CheckRight
End If

' 1 Start Down Direction
If X1 + 1 <= 7 Then
If (TileColor(X1 + 1, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 4) * (Rotation(X1 + 1, X2) = 3)) + (Barragoon(X1 + 1, X2) = 6)) Then Y1 = X1 + 1: Y2 = X2: Moves = 1: V = 0: GoSub CheckLeft
If (TileColor(X1 + 1, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) Then Y1 = X1 + 1: Y2 = X2: Moves = 1: V = 0: GoSub CheckDown
If (TileColor(X1 + 1, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 5) * (Rotation(X1 + 1, X2) = 3)) + (Barragoon(X1 + 1, X2) = 6)) Then Y1 = X1 + 1: Y2 = X2: Moves = 1: V = 0: GoSub CheckRight
End If

' 1 Start Left Direction
If X2 - 1 >= 1 Then
If (TileColor(X1, X2 - 1) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Rotation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) Then Y1 = X1: Y2 = X2 - 1: Moves = 1: V = 0: GoSub CheckLeft
If (TileColor(X1, X2 - 1) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 4) * (Rotation(X1, X2 - 1) = 4)) + (Barragoon(X1, X2 - 1) = 6)) Then Y1 = X1: Y2 = X2 - 1: Moves = 1: V = 0: GoSub CheckUp
If (TileColor(X1, X2 - 1) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 5) * (Rotation(X1, X2 - 1) = 4)) + (Barragoon(X1, X2 - 1) = 6)) Then Y1 = X1: Y2 = X2 - 1: Moves = 1: V = 0: GoSub CheckDown
End If
Return


Start2Spaces:
' 2 Start Up Then Turn
If X1 - 2 >= 1 Then
If (TileColor(X1 - 1, X2) = 0) * (TileColor(X1 - 2, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 2, X2) = 0) + ((Barragoon(X1 - 2, X2) = 5) * (Rotation(X1 - 2, X2) = 1)) + (Barragoon(X1 - 2, X2) = 6)) Then Y1 = X1 - 2: Y2 = X2: Moves = 2: V = 0: GoSub CheckLeft
If (TileColor(X1 - 1, X2) = 0) * (TileColor(X1 - 2, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 2, X2) = 0) + ((Barragoon(X1 - 2, X2) = 2) * (Rotation(X1 - 2, X2) = 1)) + ((Barragoon(X1 - 2, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) Then Y1 = X1 - 2: Y2 = X2: Moves = 2: V = 0: GoSub CheckUp
If (TileColor(X1 - 1, X2) = 0) * (TileColor(X1 - 2, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 2, X2) = 0) + ((Barragoon(X1 - 2, X2) = 4) * (Rotation(X1 - 2, X2) = 1)) + (Barragoon(X1 - 2, X2) = 6)) Then Y1 = X1 - 2: Y2 = X2: Moves = 2: V = 0: GoSub CheckRight
End If

' 2 Start Right Then Turn
If X2 + 2 <= 9 Then
If (TileColor(X1, X2 + 1) = 0) * (TileColor(X1, X2 + 2) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) * ((Barragoon(X1, X2 + 2) = 0) + ((Barragoon(X1, X2 + 2) = 4) * (Rotatiom(X1, X2 + 2) = 2)) + (Barragoon(X1, X2 + 2) = 6)) Then Y1 = X1: Y2 = X2 + 2: Moves = 2: V = 0: GoSub CheckDown
If (TileColor(X1, X2 + 1) = 0) * (TileColor(X1, X2 + 2) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) * ((Barragoon(X1, X2 + 2) = 0) + ((Barragoon(X1, X2 + 2) = 5) * (Rotatiom(X1, X2 + 2) = 2)) + (Barragoon(X1, X2 + 2) = 6)) Then Y1 = X1: Y2 = X2 + 2: Moves = 2: V = 0: GoSub CheckUp
If (TileColor(X1, X2 + 1) = 0) * (TileColor(X1, X2 + 2) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) * ((Barragoon(X1, X2 + 2) = 0) + ((Barragoon(X1, X2 + 2) = 2) * (Rotatiom(X1, X2 + 2) = 2)) + ((Barragoon(X1, X2 + 2) = 3) * (Rotation(X1, X2 + 2) = 1))) Then Y1 = X1: Y2 = X2 + 2: Moves = 2: V = 0: GoSub CheckRight
End If

' 2 Start Down Then Turn
If X1 + 2 <= 7 Then
If (TileColor(X1 + 1, X2) = 0) * (TileColor(X1 + 2, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) * ((Barragoon(X1 + 2, X2) = 0) + ((Barragoon(X1 + 2, X2) = 4) * (Rotation(X1 + 2, X2) = 3)) + (Barragoon(X1 + 2, X2) = 6)) Then Y1 = X1 + 2: Y2 = X2: Moves = 2: V = 0: GoSub CheckLeft
If (TileColor(X1 + 1, X2) = 0) * (TileColor(X1 + 2, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) * ((Barragoon(X1 + 2, X2) = 0) + ((Barragoon(X1 + 2, X2) = 2) * (Rotation(X1 + 2, X2) = 3)) + ((Barragoon(X1 + 2, X2) = 3) * (Rotation(X1 + 2, X2) = 2))) Then Y1 = X1 + 2: Y2 = X2: Moves = 2: V = 0: GoSub CheckDown
If (TileColor(X1 + 1, X2) = 0) * (TileColor(X1 + 2, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) * ((Barragoon(X1 + 2, X2) = 0) + ((Barragoon(X1 + 2, X2) = 5) * (Rotation(X1 + 2, X2) = 3)) + (Barragoon(X1 + 2, X2) = 6)) Then Y1 = X1 + 2: Y2 = X2: Moves = 2: V = 0: GoSub CheckRight
End If

' 2 Start Left Then Turn
If X2 - 2 >= 1 Then
If (TileColor(X1, X2 - 1) = 0) * (TileColor(X1, X2 - 2) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Roatation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) * ((Barragoon(X1, X2 - 2) = 0) + ((Barragoon(X1, X2 - 2) = 2) * (Rotation(X1, X2 - 2) = 2)) + ((Barragoon(X1, X2 - 2) = 3) * (Rotation(X1, X2 - 2) = 1))) Then Y1 = X1: Y2 = X2 - 2: Moves = 2: V = 0: GoSub CheckLeft
If (TileColor(X1, X2 - 1) = 0) * (TileColor(X1, X2 - 2) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Roatation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) * ((Barragoon(X1, X2 - 2) = 0) + ((Barragoon(X1, X2 - 2) = 4) * (Rotation(X1, X2 - 2) = 4)) + (Barragoon(X1, X2 - 2) = 6)) Then Y1 = X1: Y2 = X2 - 2: Moves = 2: V = 0: GoSub CheckUp
If (TileColor(X1, X2 - 1) = 0) * (TileColor(X1, X2 - 2) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Roatation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) * ((Barragoon(X1, X2 - 2) = 0) + ((Barragoon(X1, X2 - 2) = 5) * (Rotation(X1, X2 - 2) = 4)) + (Barragoon(X1, X2 - 2) = 6)) Then Y1 = X1: Y2 = X2 - 2: Moves = 2: V = 0: GoSub CheckDown
End If
Return


Start3Spaces:
' 3 Start Up Then Turn
If X1 - 3 >= 1 Then
If (TileColor(X1 - 1, X2) = 0) * (TileColor(X1 - 2, X2) = 0) * (TileColor(X1 - 3, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 2, X2) = 0) + ((Barragoon(X1 - 2, X2) = 2) * (Rotation(X1 - 2, X2) = 1)) + ((Barragoon(X1 - 2, X2) = 3) * (Rotation(X1 - 2, X2) = 2))) * ((Barragoon(X1 - 3, X2) = 0) + ((Barragoon(X1 - 3, X2) = 5) * (Rotation(X1 - 3, X2) = 1)) + (Barragoon(X1 - 3, X2) = 6)) Then Y1 = X1 - 3: Y2 = X2: Moves = 3: V = 0: GoSub CheckLeft
If (TileColor(X1 - 1, X2) = 0) * (TileColor(X1 - 2, X2) = 0) * (TileColor(X1 - 3, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 2, X2) = 0) + ((Barragoon(X1 - 2, X2) = 2) * (Rotation(X1 - 2, X2) = 1)) + ((Barragoon(X1 - 2, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 3, X2) = 0) + ((Barragoon(X1 - 3, X2) = 2) * (Rotation(X1 - 3, X2) = 1)) + ((Barragoon(X1 - 3, X2) = 2) * (Rotation(X1 - 3, X2) = 2))) Then Y1 = X1 - 3: Y2 = X2: Moves = 3: V = 0: GoSub CheckUp
If (TileColor(X1 - 1, X2) = 0) * (TileColor(X1 - 2, X2) = 0) * (TileColor(X1 - 3, X2) = 0) * ((Barragoon(X1 - 1, X2) = 0) + ((Barragoon(X1 - 1, X2) = 2) * (Rotation(X1 - 1, X2) = 1)) + ((Barragoon(X1 - 1, X2) = 3) * (Rotation(X1 - 1, X2) = 2))) * ((Barragoon(X1 - 2, X2) = 0) + ((Barragoon(X1 - 2, X2) = 2) * (Rotation(X1 - 2, X2) = 1)) + ((Barragoon(X1 - 2, X2) = 3) * (Rotation(X1 - 2, X2) = 2))) * ((Barragoon(X1 - 3, X2) = 0) + ((Barragoon(X1 - 3, X2) = 4) * (Rotation(X1 - 3, X2) = 1)) + (Barragoon(X1 - 3, X2) = 6)) Then Y1 = X1 - 3: Y2 = X2: Moves = 3: V = 0: GoSub CheckRight
End If

' 3 Start Right Then Turn
If X2 + 3 <= 9 Then
If (TileColor(X1, X2 + 1) = 0) * (TileColor(X1, X2 + 2) = 0) * (TileColor(X1, X2 + 3) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) * ((Barragoon(X1, X2 + 2) = 0) + ((Barragoon(X1, X2 + 2) = 2) * (Rotatiom(X1, X2 + 2) = 2)) + ((Barragoon(X1, X2 + 2) = 3) * (Rotation(X1, X2 + 2) = 1))) * ((Barragoon(X1, X2 + 3) = 0) + ((Barragoon(X1, X2 + 3) = 4) * (Rotation(X1, X2 + 3) = 2)) + (Barragoon(X1, X2 + 3) = 6)) Then Y1 = X1: Y2 = X2 + 3: Moves = 3: V = 0: GoSub CheckDown
If (TileColor(X1, X2 + 1) = 0) * (TileColor(X1, X2 + 2) = 0) * (TileColor(X1, X2 + 3) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) * ((Barragoon(X1, X2 + 2) = 0) + ((Barragoon(X1, X2 + 2) = 2) * (Rotatiom(X1, X2 + 2) = 2)) + ((Barragoon(X1, X2 + 2) = 6) * (Rotation(X1, X2 + 2) = 1))) * ((Barragoon(X1, X2 + 3) = 0) + ((Barragoon(X1, X2 + 3) = 5) * (Rotation(X1, X2 + 3) = 2)) + (Barragoon(X1, X2 + 3) = 6)) Then Y1 = X1: Y2 = X2 + 3: Moves = 3: V = 0: GoSub CheckUp
If (TileColor(X1, X2 + 1) = 0) * (TileColor(X1, X2 + 2) = 0) * (TileColor(X1, X2 + 3) = 0) * ((Barragoon(X1, X2 + 1) = 0) + ((Barragoon(X1, X2 + 1) = 2) * (Rotation(X1, X2 + 1) = 2)) + ((Barragoon(X1, X2 + 1) = 3) * (Rotation(X1, X2 + 1) = 1))) * ((Barragoon(X1, X2 + 2) = 0) + ((Barragoon(X1, X2 + 2) = 2) * (Rotatiom(X1, X2 + 2) = 2)) + ((Barragoon(X1, X2 + 2) = 3) * (Rotation(X1, X2 + 2) = 1))) * ((Barragoon(X1, X2 + 3) = 0) + ((Barragoon(X1, X2 + 3) = 2) * (Rotation(X1, X2 + 3) = 2)) + ((Barragoon(X1, X2 + 3) = 3) * (Rotation(X1, X2 + 3) = 1))) Then Y1 = X1: Y2 = X2 + 3: Moves = 3: V = 0: GoSub CheckRight
End If

' 3 Start Down Then Turn
If X1 + 3 <= 7 Then
If (TileColor(X1 + 1, X2) = 0) * (TileColor(X1 + 2, X2) = 0) * (TileColor(X1 + 3, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) * ((Barragoon(X1 + 2, X2) = 0) + ((Barragoon(X1 + 2, X2) = 2) * (Rotation(X1 + 2, X2) = 3)) + ((Barragoon(X1 + 2, X2) = 3) * (Rotation(X1 + 2, X2) = 2))) * ((Barragoon(X1 + 3, X2) = 0) + ((Barragoon(X1 + 3, X2) = 4) * (Rotation(X1 + 3, X2) = 3)) + (Barragoon(X1 + 3, X2) = 6)) Then Y1 = X1 + 3: Y2 = X2: Moves = 3: V = 0: GoSub CheckLeft
If (TileColor(X1 + 1, X2) = 0) * (TileColor(X1 + 2, X2) = 0) * (TileColor(X1 + 3, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) * ((Barragoon(X1 + 2, X2) = 0) + ((Barragoon(X1 + 2, X2) = 2) * (Rotation(X1 + 2, X2) = 3)) + ((Barragoon(X1 + 2, X2) = 3) * (Rotation(X1 + 2, X2) = 2))) * ((Barragoon(X1 + 3, X2) = 0) + ((Barragoon(X1 + 3, X2) = 2) * (Rotation(X1 + 3, X2) = 3)) + ((Barragoon(X1 + 3, X2) = 3) * (Rotation(X1 + 3, X2) = 1))) Then Y1 = X1 + 3: Y2 = X2: Moves = 3: V = 0: GoSub CheckDown
If (TileColor(X1 + 1, X2) = 0) * (TileColor(X1 + 2, X2) = 0) * (TileColor(X1 + 3, X2) = 0) * ((Barragoon(X1 + 1, X2) = 0) + ((Barragoon(X1 + 1, X2) = 2) * (Rotation(X1 + 1, X2) = 3)) + ((Barragoon(X1 + 1, X2) = 3) * (Rotation(X1 + 1, X2) = 2))) * ((Barragoon(X1 + 2, X2) = 0) + ((Barragoon(X1 + 2, X2) = 2) * (Rotation(X1 + 2, X2) = 3)) + ((Barragoon(X1 + 2, X2) = 3) * (Rotation(X1 + 2, X2) = 2))) * ((Barragoon(X1 + 3, X2) = 0) + ((Barragoon(X1 + 3, X2) = 5) * (Rotation(X1 + 3, X2) = 3)) + (Barragoon(X1 + 3, X2) = 6)) Then Y1 = X1 + 3: Y2 = X2: Moves = 3: V = 0: GoSub CheckRight
End If

' 3 Start Left Then Turn
If X2 - 3 >= 1 Then
If (TileColor(X1, X2 - 1) = 0) * (TileColor(X1, X2 - 2) = 0) * (TileColor(X1, X2 - 3) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Rotation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) * ((Barragoon(X1, X2 - 2) = 0) + ((Barragoon(X1, X2 - 2) = 2) * (Rotation(X1, X2 - 2) = 4)) + ((Barragoon(X1, X2 - 2) = 3) * (Rotation(X1, X2 - 2) = 1))) * ((Barragoon(X1, X2 - 3) = 0) + ((Barragoon(X1, X2 - 3) = 2) * (Rotation(X1, X2 - 3) = 4)) + ((Barragoon(X1, X2 - 3) = 3) * (Rotation(X1, X2 - 3) = 1))) Then Y1 = X1: Y2 = X2 - 3: Moves = 3: V = 0: GoSub CheckLeft
If (TileColor(X1, X2 - 1) = 0) * (TileColor(X1, X2 - 2) = 0) * (TileColor(X1, X2 - 3) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Rotation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) * ((Barragoon(X1, X2 - 2) = 0) + ((Barragoon(X1, X2 - 2) = 2) * (Rotation(X1, X2 - 2) = 4)) + ((Barragoon(X1, X2 - 2) = 3) * (Rotation(X1, X2 - 2) = 1))) * ((Barragoon(X1, X2 - 3) = 0) + ((Barragoon(X1, X2 - 3) = 4) * (Rotation(X1, X2 - 3) = 4)) + (Barragoon(X1, X2 - 3) = 6)) Then Y1 = X1: Y2 = X2 - 3: Moves = 3: V = 0: GoSub CheckUp
If (TileColor(X1, X2 - 1) = 0) * (TileColor(X1, X2 - 2) = 0) * (TileColor(X1, X2 - 3) = 0) * ((Barragoon(X1, X2 - 1) = 0) + ((Barragoon(X1, X2 - 1) = 2) * (Rotation(X1, X2 - 1) = 4)) + ((Barragoon(X1, X2 - 1) = 3) * (Rotation(X1, X2 - 1) = 1))) * ((Barragoon(X1, X2 - 2) = 0) + ((Barragoon(X1, X2 - 2) = 2) * (Rotation(X1, X2 - 2) = 4)) + ((Barragoon(X1, X2 - 2) = 3) * (Rotation(X1, X2 - 2) = 1))) * ((Barragoon(X1, X2 - 3) = 0) + ((Barragoon(X1, X2 - 3) = 5) * (Rotation(X1, X2 - 3) = 4)) + (Barragoon(X1, X2 - 3) = 6)) Then Y1 = X1: Y2 = X2 - 3: Moves = 3: V = 0: GoSub CheckDown
End If
Return


CheckUp:
If Moves + V = Piece - 1 Then If TileColor(Y1 - V, Y2) + Barragoon(Y1 - V, Y2) = 0 Then X = 1: Playable(Y1 - V, Y2) = 1: ' Short Move Up
If Y1 - V - 1 >= 1 Then
V = V + 1
If Moves + V = Piece Then
If TileColor(Y1 - V, Y2) = Player Then Return
If (Piece = 2) * (Barragoon(Y1 - V, Y2) = 6) Then Return
Playable(Y1 - V, Y2) = 1: X = 1: Return
Else
If (TileColor(Y1 - V, Y2) = 0) * ((Barragoon(Y1 - V, Y2) = 0) + ((Barragoon(Y1 - V, Y2) = 2) * (Rotation(Y1 - V, Y2) = 1)) + ((Barragoon(Y1 - V, Y2) = 3) * (Rotation(Y1 - V, Y2) = 2))) GoTo CheckUp
Return
End If
End If
Return

CheckRight:
If Moves + V = Piece - 1 Then If TileColor(Y1, Y2 + V) + Barragoon(Y1, Y2 + V) = 0 Then X = 1: Playable(Y1, Y2 + V) = 1: ' Short Move Right
If Y2 + V + 1 <= 9 Then
V = V + 1
If Moves + V = Piece Then
If TileColor(Y1, Y2 + V) = Player Then Return
If (Piece = 2) * (Barragoon(Y1, Y2 + V) = 6) Then Return
Playable(Y1, Y2 + V) = 1: X = 1: Return
Else
If (TileColor(Y1, Y2 + V) = 0) * ((Barragoon(Y1, Y2 + V) = 0) + ((Barragoon(Y1, Y2 + V) = 2) * (Rotation(Y1, Y2 + V) = 2)) + ((Barragoon(Y1, Y2 + V) = 3) * (Rotation(Y1, Y2 + V) = 1))) GoTo CheckRight
Return
End If
End If
Return

CheckDown:
If Moves + V = Piece - 1 Then If TileColor(Y1 + V, Y2) + Barragoon(Y1 + V, Y2) = 0 Then X = 1: Playable(Y1 + V, Y2) = 1: ' Short Move Right
If Y1 + V + 1 <= 7 Then
V = V + 1
If Moves + V = Piece Then
If TileColor(Y1 + V, Y2) = Player Then Return
If (Piece = 2) * (Barragoon(Y1 + V, Y2) = 6) Then Return
Playable(Y1 + V, Y2) = 1: X = 1: Return
Else
If (TileColor(Y1 + V, Y2) = 0) * ((Barragoon(Y1 + V, Y2) = 0) + ((Barragoon(Y1 + V, Y2) = 2) * (Rotation(Y1 + V, Y2) = 3)) + ((Barragoon(Y1 + V, Y2) = 3) * (Rotation(Y1 + V, Y2) = 2))) GoTo CheckDown
Return
End If
End If
Return

CheckLeft:
If Moves + V = Piece - 1 Then If TileColor(Y1, Y2 - V) + Barragoon(Y1, Y2 - V) = 0 Then X = 1: Playable(Y1, Y2 - V) = 1: ' Short Move Left
If Y2 - V - 1 >= 1 Then
V = V + 1
If Moves + V = Piece Then
If TileColor(Y1, Y2 - V) = Player Then Return
If (Piece = 2) * (Barragoon(Y1, Y2 - V) = 6) Then Return
Playable(Y1, Y2 - V) = 1: X = 1: Return
Else
If (TileColor(Y1, Y2 - V) = 0) * ((Barragoon(Y1, Y2 - V) = 0) + ((Barragoon(Y1, Y2 - V) = 2) * (Rotation(Y1, Y2 - V) = 4)) + ((Barragoon(Y1, Y2 - V) = 3) * (Rotation(V1, Y2 - V) = 1))) GoTo CheckLeft
Return
End If
End If
Return


Winner:
X1 = 1067: X2 = 100: X3 = Winner: X4 = 2: X5 = 1: GoSub DrawTile
Color 15, 1: Locate 10, 130: Print "Player:"; Winner;
Color 15, 1: Locate 13, 121: Print " Player"; Winner; "is the Winner! ";
Color 15, 1: Locate 15, 121: Print " Play Another Game? Y or N ";
GetYesNo: A$ = UCase$(InKey$): If A$ = "" GoTo GetYesNo
If A$ = "Y" Then Run
If A$ = "N" Then System
GoTo GetYesNo
Reply




Users browsing this thread: 1 Guest(s)