You are not logged in or registered. Please login or register to use the full functionality of this board...
Login Register For FREE

QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Connect Four
QB64 Member Project - Dreamy Clock
QB64 Member Project - Qubic
QB64 Member Project - Spiro Roses
QB64 Member Project - Amazon
QB64 Member Project - Inside Moves
QB64 Member Project - Domain
QB64 Member Project - Algeria Weather
QB64 Member Project - Othello
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Color Triangles
QB64 Member Project - Quarto
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Point Blank
QB64 Member Project - Foursight
QB64 Member Project - Touche
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Kings Court
QB64 Member Project - 9 Board
QB64 Member Project - Isolation
QB64 Member Project - Dakapo
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Basic Dithering
QB64 Member Project - Rubix's Magic
QB64 Member Project - Score 4
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Pivet version one
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Bowditch curve
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Rotating Background
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Line Thickness
QB64 Member Project - Exit
QB64 Member Project - Color Rotating Text
QB64 Member Project - ARB Checkers
QB64 Member Project - Overboard
QB64 Member Project - Splatter
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Kings Valley verion one
QB64 Member Project - Blokus
QB64 Member Project - Pivot version two
QB64 Member Project - Swirl
QB64 Member Project - Sabotage
QB64 Member Project - Input
QB64 Member Project - Spinning Color Wheel



Blokus Board Game in QB64
10-23-2014, 12:07 AM (This post was last modified: 12-08-2016 03:06 PM by Waltersmind.)
Post: #1
 (Print Post)
Blokus Board Game in QB64
I just finished Blokus board game today. I've tested it and hopefully I gotten all the bugs out. I actually started making notes on how I was going to make the game on my Tandy 2000, if I ever got it working and even before I ever heard of QB64. So the game for them most part is wrttien for how I intended it to run on the Tandy 2000, with some improvements which takes advantage of some of the QB64 enhancements.

I haven't taken the time yet to put together a decent set of instructions on how to play the game. You can google the instructions on how to play the board game and during the play of the game, you can press 'I' for a quick listing on the keyboard inputs. That's right, another one my games that don't use a mouse. It was never intended for a mouse. 

A quick description of the game: Blokus is played on a 20x20 gameboard with 4 colors in play, with 21 Tetris like shaped pieces for each color. The game starts of my each player, one by one, placing 1 of their pieces in their corner of the board. After the first pieces are played, each player places a piece on the board with at least 1 corner touching an existing piece already on the board of their same color. Pieces of the same color can not touch on the sides. If a player can not play anymore pieces their color, they are skipped til the end of the game when the scoring is done. The game ends when no one can put anymore pieces on the board. 

Scoring is as followed: each player recieves 15 points if they are able to play all of their pieces. 5 points earned if they same the smallest piece to be played last. -1 point for each block of the pieces that were not played. example: a piece containing 5 blocks has a are scored -5 point against them.

On the side of the board is an inventory of all of their pieces. As pieces are played on the board, they will be filled in painted grey. If the piece is not playable for that turn, it will be painted it white, else the piece will be painted it's color.

There is a cursor in the near center of the board representing the shape of the piece #1, the single block piece. Pressing 'N' will change the cursor to the next playable piece. 'P' will change the cursor to the previous playable piece. Pressing 'P' at piece #1 will take you to piece #21 and into 5 pointer pieces. 'R' will rotate the piece clockwise. 'C' will rotate the piece counter clokwise. 'ENTER' will place the piece on the board. Pressing '1, 2, 3 or 4' will change the piece inventory to show your opponents pieces are unplayed.

I'll try to put together a more complete set of rules and save it as a doc or pdf.

Hope you enjoy playing. 

Donald
Code Snippet: [Select]
_TITLE "Blokus by Donald L. Foster Jr."


CLEAR

SCREEN _NEWIMAGE(1010, 735, 256)

_PALETTECOLOR 6, _RGB32(0, 128, 128) '            Cyan
_PALETTECOLOR 3, _RGB32(90, 90, 90) '             Grey
_PALETTECOLOR 9, _RGB32(0, 0, 160) '              Blue
_PALETTECOLOR 7, _RGB32(255, 215, 0) '            Yellow
_PALETTECOLOR 12, _RGB32(160, 0, 0) '             Red
_PALETTECOLOR 2, _RGB32(0, 80, 0) '               Green
_PALETTECOLOR 5, _RGB32(139, 0, 139) '            Magenta
_PALETTECOLOR 4, _RGB32(255, 140, 0) '            Orange

DIM PieceSize(21) AS INTEGER
DIM PieceRotate(21) AS INTEGER
DIM PieceWidth(21, 8) AS INTEGER
DIM PieceHeight(21, 8) AS INTEGER
DIM PieceCorner(21) AS INTEGER
DIM PieceSide(21) AS INTEGER
DIM BoardPiece(20, 20) AS INTEGER
DIM BoardColor(20, 20) AS INTEGER
DIM BoardRotate(20, 20) AS INTEGER
DIM BlockRow(21, 8, 5) AS INTEGER
DIM BlockColumn(21, 8, 5) AS INTEGER
DIM CornerRow(21, 8, 8) AS INTEGER
DIM CornerColumn(21, 8, 8) AS INTEGER
DIM SideRow(21, 8, 12) AS INTEGER
DIM SideColumn(21, 8, 12) AS INTEGER
DIM HasPlayed(4, 21) AS INTEGER
DIM CantPlay(21) AS INTEGER
DIM PieceList(21) AS INTEGER '          Counter will be inside PieceList
DIM UnplayedPieces(4, 21) AS INTEGER
DIM PieceCounter AS INTEGER
DIM PieceTotal AS INTEGER
DIM PlayerEndGame(4) AS INTEGER
DIM EndGame AS INTEGER
DIM a(20, 20) AS INTEGER
DIM b(20, 20) AS INTEGER
DIM c(30, 11) AS INTEGER
DIM d(30, 11) AS INTEGER
DIM Player AS INTEGER
DIM PieceColor AS INTEGER
DIM SubPlayer AS INTEGER
DIM Row AS INTEGER
DIM Column AS INTEGER
DIM PreviousRow AS INTEGER
DIM PreviousColumn AS INTEGER
DIM Piece AS INTEGER
DIM PreviousPiece AS INTEGER
DIM Rotate AS INTEGER
DIM PreviousRotate AS INTEGER
DIM InvRow(21) AS INTEGER
DIM InvColumn(21) AS INTEGER
DIM InvRotate(21) AS INTEGER
DIM Blokus AS LONG

DIM Cursor$(21, 8)

Cursor$(1, 1) = "R34D34L34U34"
Cursor$(2, 1) = "R34D68L34U68": Cursor$(2, 2) = "R68D34L68U34"
Cursor$(3, 1) = "R34D102L34U102": Cursor$(3, 2) = "R102D34L102U34"
Cursor$(4, 1) = "R34D34R34D34L68U68": Cursor$(4, 2) = "R68D34L34D34L34U68": Cursor$(4, 3) = "R68D68L34U34L34U34": Cursor$(4, 4) = "BR34R34D68L68U34R34U34"
Cursor$(5, 1) = "R34D136L34U136": Cursor$(5, 2) = "R136D34L136U34"
Cursor$(6, 1) = "BR34R34D102L68U34R34U68": Cursor$(6, 2) = "R34D34R68D34L102U68": Cursor$(6, 3) = "R68D34L34D68L34U102": Cursor$(6, 4) = "R102D68L34U34L68U34": Cursor$(6, 5) = "R34D68R34D34L68U102": Cursor$(6, 6) = "R102D34L68D34L34U68": Cursor$(6, 7) = "R68D102L34U68L34U34": Cursor$(6, 8) = "BR68R34D68L102U34R68U34"
Cursor$(7, 1) = "R34D34R34D34L34D34L34U102": Cursor$(7, 2) = "R102D34L34D34L34U34L34U34": Cursor$(7, 3) = "BR34R34D102L34U34L34U34R34U34": Cursor$(7, 4) = "BR34R34D34R34D34L102U34R34U34"
Cursor$(8, 1) = "R68D68L68U68"
Cursor$(9, 1) = "R68D34R34D34L68U34L34U34": Cursor$(9, 2) = "BR34R34D68L34D34L34U68R34U34": Cursor$(9, 3) = "BR34R68D34L34D34L68U34R34U34": Cursor$(9, 4) = "R34D34R34D68L34U34L34U68"
Cursor$(10, 1) = "R34D170L34U170": Cursor$(10, 2) = "R170D34L170U34"
Cursor$(11, 1) = "BR34R34D136L68U34R34U102": Cursor$(11, 2) = "R34D34R102D34L136U68": Cursor$(11, 3) = "R68D34L34D102L34U136": Cursor$(11, 4) = "R136D68L34U34L102U34": Cursor$(11, 5) = "R34D102R34D34L68U136": Cursor$(11, 6) = "R136D34L102D34L34U68": Cursor$(11, 7) = "R68D136L34U102L34U34": Cursor$(11, 8) = "BR102R34D68L136U34R102U34"
Cursor$(12, 1) = "BR34R34D102L34D34L34U68R34U68": Cursor$(12, 2) = "R68D34R68D34L102U34L34U34": Cursor$(12, 3) = "BR34R34D68L34D68L34U102R34U34": Cursor$(12, 4) = "R102D34R34D34L68U34L68U34": Cursor$(12, 5) = "R34D68R34D68L34U34L34U102": Cursor$(12, 6) = "BR34R102D34L68D34L68U34R34U34": Cursor$(12, 7) = "R34D34R34D102L34U68L34U68": Cursor$(12, 8) = "BR68R68D34L34D34L102U34R68U34"
Cursor$(13, 1) = "BR34R34D102L68U68R34U34": Cursor$(13, 2) = "R68D34R34D34L102U68": Cursor$(13, 3) = "r68d68l34d34l34u102": Cursor$(13, 4) = "R102D68L68U34L34U34": Cursor$(13, 5) = "R34D34R34D68L68U102": Cursor$(13, 6) = "R102D34L34D34L68U68": Cursor$(13, 7) = "R68D102L34U34L34U68": Cursor$(13, 8) = "BR34R68D68L102U34R34U34"
Cursor$(14, 1) = "R68D102L68U34R34U34L34U34": Cursor$(14, 2) = "R34D34R34U34R34D68L102U68": Cursor$(14, 3) = "R68D34L34D34R34D34L68U102": Cursor$(14, 4) = "R102D68L34U34L34D34L34U68"
Cursor$(15, 1) = "R34D34R34D34L34D68L34U136": Cursor$(15, 2) = "R136D34L34D34L34U34L68U34": Cursor$(15, 3) = "BR34R34D136L34U34L34U34R34U68": Cursor$(15, 4) = "BR34R34D34R68D34L136U34R34U34": Cursor$(15, 5) = "BR34R34D136L34U68L34U34R34U34": Cursor$(15, 6) = "BR68R34D34R34D34L136U34R68U34": Cursor$(15, 7) = "R34D68R34D34L34D34L34U136": Cursor$(15, 8) = "r136d34l68d34l34u34l34u34"
Cursor$(16, 1) = "BR34R34D68R34D34L102U34R34U68": Cursor$(16, 2) = "R34D34R68D34L68D34L34U102": Cursor$(16, 3) = "R102D34L34D68L34U68L34U34": Cursor$(16, 4) = "BR68R34D102L34U34L68U34R68U34"
Cursor$(17, 1) = "R34D68R68D34L102U102": Cursor$(17, 2) = "R102D34L68D68L34U102": Cursor$(17, 3) = "R102D102L34U68L68U34": Cursor$(17, 4) = "BR68R34D102L102U34R68U68"
Cursor$(18, 1) = "R68D34R34D68L34U34L34U34L34U34": Cursor$(18, 2) = "BR68R34D68L34D34L68U34R34U34R34U34": Cursor$(18, 3) = "R34D34R34D34R34D34L68U34L34U68": Cursor$(18, 4) = "BR34R68D34L34D34L34D34L34U68R34U34"
Cursor$(19, 1) = "R34D34R68D68L34U34L68U68": Cursor$(19, 2) = "BR34R68D34L34D68L68U34R34U68": Cursor$(19, 3) = "BR68R34D68L68D34L34U68R68U34": Cursor$(19, 4) = "R68D68R34D34L68U68L34U34"
Cursor$(20, 1) = "R34D34R68D34L34D34L34U34L34U68": Cursor$(20, 2) = "BR34R68D34L34D68L34U34L34U34R34U34": Cursor$(20, 3) = "BR34R34D34R34D68L34U34L68U34R34U34": Cursor$(20, 4) = "BR34R34D34R34D34L34D34L68U34R34U68": Cursor$(20, 5) = "BR68R34D68L34D34L34U34L34U34R68U34": Cursor$(20, 6) = "BR34R34D68R34D34L68U34L34U34R34U34": Cursor$(20, 7) = "BR34R34D34R34D34L68D34L34U68R34U34": Cursor$(20, 8) = "R68D34R34D34L34D34L34U68L34U34"
Cursor$(21, 1) = "BR34R34D34R34D34L34D34L34U34L34U34R34U34"

Player = 1: PieceColor = 1: SubPlayer = 1

Blokus = _LOADIMAGE("Blokus.JPEG")


'          PieceSize, How many blocks piece takes up on board.
DATA 1,2,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5
FOR z = 1 TO 21: READ PieceSize(z): NEXT

'          PieceRotate, How many piece rotations.
DATA 1,2,2,4,2,8,4,1,4,2,8,8,8,4,8,4,4,4,4,8,1
FOR z = 1 TO 21: READ PieceRotate(z): NEXT

'          PieceCorner, How many corners each piece has.
DATA 4,4,4,5,4,5,6,4,6,4,5,6,5,5,6,6,5,7,6,7,8
FOR z = 1 TO 21: READ PieceCorner(z): NEXT

'          PieceSide, How many sides each piece has.
DATA 4,6,8,7,10,9,8,8,8,12,11,10,9,10,10,10,11,9,10,9,8
FOR z = 1 TO 21: READ PieceSide(z): NEXT

'          PieceWidth, PieceHeight, Width and Height of every rotation of every piece.
DATA 1,1: ' piece 1
DATA 1,2,2,1: ' piece 2
DATA 1,3,3,1: ' piece 3
DATA 2,2,2,2,2,2,2,2: ' piece 4
DATA 1,4,4,1: ' piece 5
DATA 2,3,3,2,2,3,3,2,2,3,3,2,2,3,3,2: ' piece 6
DATA 2,3,3,2,2,3,3,2: ' piece 7
DATA 2,2: ' piece 8
DATA 3,2,2,3,3,2,2,3: ' piece 9
DATA 1,5,5,1: ' piece 10
DATA 2,4,4,2,2,4,4,2,2,4,4,2,2,4,4,2: ' piece 11
DATA 2,4,4,2,2,4,4,2,2,4,4,2,2,4,4,2: ' piece 12
DATA 2,3,3,2,2,3,3,2,2,3,3,2,2,3,3,2: ' piece 13
DATA 2,3,3,2,2,3,3,2: ' piece 14
DATA 2,4,4,2,2,4,4,2,2,4,4,2,2,4,4,2: ' piece 15
DATA 3,3,3,3,3,3,3,3: ' piece 16
DATA 3,3,3,3,3,3,3,3: ' piece 17
DATA 3,3,3,3,3,3,3,3: ' piece 18
DATA 3,3,3,3,3,3,3,3: ' piece 19
DATA 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3: ' piece 20
DATA 3,3: ' piece 21
FOR z = 1 TO 21: FOR y = 1 TO PieceRotate(z): READ PieceWidth(z, y), PieceHeight(z, y): NEXT: NEXT

'          BlockRow, BlockColumn, Row and Column location of block for every rotation of every piece.
DATA 0,0: ' piece 1
DATA 0,0,1,0,0,0,0,1: ' piece 2
DATA 0,0,1,0,2,0,0,0,0,1,0,2: ' piece 3
DATA 0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,0,1,1: ' piece 4
DATA 0,0,1,0,2,0,3,0,0,0,0,1,0,2,0,3: ' piece 5
DATA 0,1,1,1,2,0,2,1,0,0,1,0,1,1,1,2,0,0,0,1,1,0,2,0,0,0,0,1,0,2,​1,2,0,0,1,0,2,0,2,1,0,0,0,1,0,2,1,0,0,0,0,1,1,1,2,1,0,2,1,0,​1,1,1,2: 'piece 6
DATA 0,0,1,0,1,1,2,0,0,0,0,1,0,2,1,1,0,1,1,0,1,1,2,1,0,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​0,2,1,0,1,1,1,2,2,2,0,0,1,0,2,0,2,1,2,2,0,0,0,1,0,2,1,0,2,0,​0,0,0,1,0,2,1,2,2,2,0,2,1,2,2,0,2,1,2,2: 'pieces 16-17
DATA 0,0,0,1,1,1,1,2,2,2,0,2,1,1,1,2,2,0,2,1,0,0,1,0,1,1,2,1,2,2,​0,1,0,2,1,0,1,1,2,0,0,0,1,0,1,1,1,2,2,2,0,1,0,2,1,1,2,0,2,1,​0,2,1,0,1,1,1,2,2,0,0,0,0,1,1,1,2,1,2,2: 'pieces 18-19
DATA 0,0,1,0,1,1,1,2,2,1,0,1,0,2,1,0,1,1,2,1,0,1,1,0,1,1,1,2,2,2,​0,1,1,1,1,2,2,0,2,1,0,2,1,0,1,1,1,2,2,1,0,1,1,0,1,1,2,1,2,2,​0,1,1,0,1,1,1,2,2,0,0,0,0,1,1,1,1,2,2,1: 'piece 20
DATA 0,1,1,0,1,1,1,2,2,1: 'piece 21
FOR z = 1 TO 21: FOR y = 1 TO PieceRotate(z): FOR x = 1 TO PieceSize(z): READ BlockRow(z, y, x), BlockColumn(z, y, x): NEXT: NEXT: NEXT

'          CornerRow, CornerColumn, Row and Column location of corner for every rotation of every piece.
DATA -1,-1,-1,1,1,-1,1,1: ' piece 1
DATA -1,-1,-1,1,2,-1,2,1,-1,-1,-1,2,1,-1,1,2: ' piece 2
DATA -1,-1,-1,1,3,-1,3,1,-1,-1,-1,3,1,-1,1,3: ' piece 3
DATA -1,-1,-1,1,0,2,2,-1,2,2,-1,-1,-1,2,1,2,2,-1,2,1,-1,-1,-1,2,1,-1,2,0,2,2,-1,0,-1,2,0,-1,2,-1,2,2: ' piece 4
DATA -1,-1,-1,1,4,-1,4,1,-1,-1,-1,4,1,-1,1,4: ' piece 5
DATA -1,0,-1,2,1,-1,3,-1,3,2,-1,-1,-1,1,0,3,2,-1,2,3,-1,-1,-1,2,1,2,3,-1,3,1,-1,-1,-1,3,1,-1,2,1,2,3,-1,-1,-1,1,1,2,3,-1,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3,2,-1,3,0,3,3,-1,0,-1,2,0,-1,0,3,2,3,3,-1,3,1,-1,-1,-1,2,0,3,1,-1,2,3,3,0,3,2: 'piece 20
DATA -1,0,-1,2,0,-1,0,3,2,-1,2,3,3,0,3,2: 'piece 21
FOR z = 1 TO 21: FOR y = 1 TO PieceRotate(z): FOR x = 1 TO PieceCorner(z): READ CornerRow(z, y, x), CornerColumn(z, y, x): NEXT: NEXT: NEXT

'          SideRow, SideColumn, Row and Column location of sides for every rotation of every piece.
DATA -1,0,0,-1,0,1,1,0: ' piece 1
DATA -1,0,0,-1,0,1,1,-1,1,1,2,0,-1,0,-1,1,0,-1,0,2,1,0,1,1: ' piece 2
DATA -1,0,0,-1,0,1,1,-1,1,1,2,-1,2,1,3,0,-1,0,-1,1,-1,2,0,-1,0,3,1,0,1,1,1,2: ' piece 3
DATA -1,0,0,-1,0,1,1,-1,1,2,2,0,2,1,-1,0,-1,1,0,-1,0,2,1,-1,1,1,2,0,-1,0,-1,1,0,-1,0,2,1,0,1,2,2,1,-1,1,0,0,0,2,1,-1,1,2,2,0,2,1: ' piece 4
DATA -1,0,0,-1,0,1,1,-1,1,1,2,-1,2,1,3,-1,3,1,4,0,-1,0,-1,1,-1,2,-1,3,0,-1,0,4,1,0,1,1,1,2,1,3: ' piece 5
DATA -1,1,0,0,0,2,1,0,1,2,2,-1,2,2,3,0,3,1,-1,0,0,-1,0,1,0,2,1,-1,1,3,2,0,2,1,2,2,-1,0,-1,1,0,-1,0,2,1,-1,1,1,2,-1,2,1,3,0,-1,0,-1,1,-1,2,0,-1,0,3,1,0,1,1,1,3,2,2,-1,0,0,-1,0,1,1,-1,1,1,2,-1,2,2,3,0,3,1,-1,0,-1,1,-1,2,0,-1,0,3,1,-1,1,1,1,2,2,0,-1,0,-1,1,0,-1,0,2,1,0,1,2,2,0,2,2,3,1,-1,2,0,0,0,1,0,3,1,-1,1,3,2,0,2,1,2,2: 'piece 6
DATA -1,0,0,-1,0,1,1,-1,1,2,2,-1,2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,2,1,0,1,3,2,0,2,2,3,1: 'piece 20
DATA -1,1,0,0,0,2,1,-1,1,3,2,0,2,2,3,1: 'piece 21
FOR z = 1 TO 21: FOR y = 1 TO PieceRotate(z): FOR x = 1 TO PieceSide(z): READ SideRow(z, y, x), SideColumn(z, y, x): NEXT: NEXT: NEXT

DATA 1,1,1,1,3,2,1,6,2,1,10,3,4,8,2,3,4,2,6,1,2,3,1,1,6,5,2,10,7,​2,9,1,2,6,8,2,12,1,1,13,4,2,13,8,6,16,1,1,16,5,1,16,9,1,20,1​,1,20,5,1,20,9,1
FOR z = 1 TO 21: READ InvRow(z), InvColumn(z), InvRotate(z): NEXT

FOR z = 1 TO 4: PiecesLeft(z) = 21: FOR y = 1 TO 21: UnplayedPieces(z, y) = 1: NEXT: NEXT

Row = 11: Column = 11: Piece = 1: Rotate = 1: PreviousPiece = 1: PreviousRotate = 1: PreviousRow = 11: PreviousColumn = 11
PieceColor(1) = 9: PieceColor(2) = 7: PieceColor(3) = 12: PieceColor(4) = 2
Choice(1) = 216: Choice(2) = 248: Choice(3) = 280: Choice(4) = 312: Players = 1
FirstMove(1) = 1: FirstMove(2) = 1: FirstMove(3) = 1: FirstMove(4) = 1
PiecesLeft(1) = 21: PiecesLeft(2) = 21: PiecesLeft(3) = 21: PiecesLeft(4) = 21
PlayerEndGame(1) = 0: PlayerEndGame(2) = 0: PlayerEndGame(3) = 0: PlayerEndGame(4) = 0

PieceColor = 1: Begin = 1

DrawBoard:
LINE (0, 0)-(734, 734), 3, BF: LINE (26, 26)-(708, 708), 0, B

x = 0
FOR z = 1 TO 20
    w = 0
    FOR y = 1 TO 20
        LINE (28 + w, 28 + x)-(60 + w, 60 + x), 0, B
        a(z, y) = 27 + w: b(z, y) = 27 + x
        0 w = w + 34
    NEXT
    x = x + 34
NEXT

LOCATE 15, 95: PRINT "2 Players  1 Color  Blokus Duo";
LOCATE 17, 100: PRINT "2 Players   2 Colors";
LOCATE 19, 106: PRINT "3 Players";
LOCATE 21, 106: PRINT "4 Players";

GetChoice:
LINE (745, Choice(Choice))-(1000, Choice(Choice) + 30), 0, B
LINE (745, Choice(Players))-(1000, Choice(Players) + 30), 15, B
Choice = Players

GETPLAYERS:
A$ = INKEY$
IF A$ = "" THEN GOTO GETPLAYERS
IF (Players = 1) * (A$ = CHR$(0) + CHR$(72)) THEN Players = 4: GOTO GetChoice
IF A$ = CHR$(0) + CHR$(72) THEN Players = Players - 1: GOTO GetChoice
IF (Players = 4) * (A$ = CHR$(0) + CHR$(80)) THEN Players = 1: GOTO GetChoice
IF A$ = CHR$(0) + CHR$(80) THEN Players = Players + 1: GOTO GetChoice
IF ASC(A$) <> 13 THEN GOTO GETPLAYERS

LINE (736, 0)-(1012, 735), 15, BF: LINE (738, 2)-(1007, 732), 6, BF
COLOR 15, 6
LOCATE 2, 100
IF Players = 1 THEN PRINT "B L O K U S     D U O"; ELSE PRINT "B   L   O   K   U   S";
LOCATE 4, 100: PRINT "Player";

IF Players > 1 THEN
    PAINT (a(1, 1) + 10, b(1, 1) + 10), 9, 0
    PAINT (a(1, 20) + 10, b(1, 20) + 10), 7, 0
    PAINT (a(20, 20) + 10, b(20, 20) + 10), 12, 0
    PAINT (a(20, 1) + 10, b(20, 1) + 10), 2, 0
    Top = 1: Bottom = 20: Left = 1: Right = 20
    DisplayingColor$(1) = " Displaying Blue's pieces. "
    DisplayingColor$(2) = "Displaying Yellow's pieces."
    DisplayingColor$(3) = "  Displaying Red's pieces. "
    DisplayingColor$(4) = " Displaying Green's pieces."
    EndGame$(1) = " Blue has no more moves. "
    EndGame$(2) = "Yellow has no more moves."
    EndGame$(3) = "  Red has no more moves. "
    EndGame$(4) = " Green has no more moves."
    MaxPlayers = 4
ELSE
    FOR z = 1 TO 17
        PAINT (a(1, z) + 10, b(1, z) + 10), 0: PAINT (a(2, z) + 10, b(2, z) + 10), 0: PAINT (a(3, z) + 10, b(3, z) + 10), 0
        PAINT (a(z, 18) + 10, b(z, 18) + 10), 0: PAINT (a(z, 19) + 10, b(z, 19) + 10), 0: PAINT (a(z, 20) + 10, b(z, 20) + 10), 0
        PAINT (a(3 + z, 1) + 10, b(3 + z, 1) + 10), 0: PAINT (a(3 + z, 2) + 10, b(3 + z, 2) + 10), 0: PAINT (a(3 + z, 3) + 10, b(3 + z, 3) + 10), 0
        PAINT (a(19, 3 + z) + 10, b(19, 3 + z) + 10), 0: PAINT (a(20, 3 + z) + 10, b(20, 3 + z) + 10), 0: PAINT (a(18, 3 + z) + 10, b(18, 3 + z) + 10), 0
    NEXT
    PAINT (a(8, 8) + 10, b(8, 8) + 10), 5, 0: PAINT (a(13, 13) + 10, b(13, 13) + 10), 4, 0
    PieceColor(1) = 5: PieceColor(2) = 4
    Top = 4: Bottom = 17: Left = 4: Right = 17
    DisplayingColor$(1) = "Displaying Magenta's pieces."
    DisplayingColor$(2) = "Displaying Orange's pieces. "
    EndGame$(1) = "Magenta has no more moves."
    EndGame$(2) = "Orange has no more moves. "
    MaxPlayers = 2
END IF

x = 0
FOR z = 1 TO 22
    w = 0
    FOR y = 1 TO 11
        c(z, y) = 741 + w: d(z, y) = 118 + x
        w = w + 24
    NEXT
    x = x + 24
NEXT

BeginTurn:
PieceCounter = 1

LINE (843, 37)-(960, 71), 6, BF

IF (Players = 3) * (PieceColor = 4) THEN
    LOCATE 4, 106: PRINT SubPlayer;
    LINE (877, 38)-(909, 70), 0, B
    PAINT (879, 40), PieceColor(SubPlayer), 0
    PSET (881, 42), 15: DRAW "NR20D20"
    LINE (927, 38)-(959, 70), 0, B
    PAINT (929, 40), PieceColor(4), 0
    PSET (931, 42), 15: DRAW "NR20D20"
    PSET (926, 37), 15: DRAW "R34D34L34U34"
ELSEIF Players = 2 THEN
    LOCATE 4, 106: PRINT Player;
    LINE (877, 38)-(909, 70), 0, B
    PAINT (879, 40), PieceColor(Player), 0
    PSET (881, 42), 15: DRAW "NR20D20"
    LINE (927, 38)-(959, 70), 0, B
    PAINT (929, 40), PieceColor(Player + 2), 0
    PSET (931, 42), 15: DRAW "NR20D20"
    IF Player = PieceColor THEN
        PSET (876, 37), 15: DRAW "R34D34L34U34"
    ELSE
        PSET (926, 37), 15: DRAW "R34D34L34U34"
    END IF
ELSE
    LOCATE 4, 106: PRINT Player;
    LINE (927, 38)-(959, 70), 0, B
    PAINT (929, 40), PieceColor(Player), 0
    PSET (931, 42), 15: DRAW "NR20D20"
    PSET (926, 37), 15: DRAW "R34D34L34U34"
END IF

IF (FirstMove(PieceColor) = 1) * (Players > 1) THEN
    PieceTotal = 20
ELSEIF FirstMove(PieceColor) = 1 THEN
    PieceTotal = 21
ELSE
    GOTO GetPieceList
END IF

FOR z = 1 TO PieceTotal: PieceList(z) = z: NEXT

GOTO DrawInventoryPieces

GetPieceList:
FOR z = 1 TO 21: CantPlay(z) = 0: NEXT

PieceTotal = 0

FOR Piece = 1 TO 21
    x = 0
    IF HasPlayed(PieceColor, Piece) = 1 THEN GOTO EndLoop
    FOR Rotate = 1 TO PieceRotate(Piece)
        FOR ScanRow = Top TO Bottom - PieceHeight(Piece, Rotate) + 1
            FOR ScanColumn = Left TO Right - PieceWidth(Piece, Rotate) + 1
                v = 0
                FOR z = 1 TO PieceSize(Piece)
                    BlockRow = ScanRow + BlockRow(Piece, Rotate, z): BlockColumn = ScanColumn + BlockColumn(Piece, Rotate, z)
                    IF BoardColor(BlockRow, BlockColumn) > 0 THEN v = 1
                NEXT
                IF v = 1 THEN GOTO EndLoop5

                v = 0
                FOR z = 1 TO PieceCorner(Piece)
                    CornerRow = ScanRow + CornerRow(Piece, Rotate, z): CornerColumn = ScanColumn + CornerColumn(Piece, Rotate, z)
                    IF (CornerRow >= Top) * (CornerRow <= Bottom) * (CornerColumn >= Left) * (CornerColumn <= Right) THEN IF BoardColor(CornerRow, CornerColumn) = PieceColor THEN v = 1
                NEXT
                IF v = 0 THEN GOTO EndLoop5

                v = 0
                FOR z = 1 TO PieceSide(Piece)
                    SideRow = ScanRow + SideRow(Piece, Rotate, z): SideColumn = ScanColumn + SideColumn(Piece, Rotate, z)
                    IF (SideRow >= Top) * (SideRow <= Bottom) * (SideColumn >= Left) * (SideColumn <= Right) THEN IF BoardColor(SideRow, SideColumn) = PieceColor THEN v = 1
                NEXT
                IF v = 0 THEN
                    x = 1
                    PieceTotal = PieceTotal + 1
                    PieceList(PieceTotal) = Piece
                    EXIT FOR
                END IF

                EndLoop5:

            NEXT
            IF x = 1 THEN EXIT FOR
        NEXT
        IF x = 1 THEN EXIT FOR
    NEXT
    EndLoop:
    IF x = 0 THEN CantPlay(Piece) = 1
NEXT

IF PieceTotal = 0 THEN PlayerEndGame(PieceColor) = 1

IF (Players > 1) * (PlayerEndGame(1) = 1) * (PlayerEndGame(2) = 1) * (PlayerEndGame(3) = 1) * (PlayerEndGame(4) = 1) THEN GOTO Scores
IF (Players = 1) * (PlayerEndGame(1) = 1) * (PlayerEndGame(2) = 1) THEN GOTO Scores

DrawInventoryPieces:
FOR z = 1 TO 21
    e = PieceColor(PieceColor)
    IF (FirstMove(PieceColor) = 1) * (Players > 1) * (z = 21) THEN e = 15
    IF CantPlay(z) = 1 THEN e = 15
    IF HasPlayed(PieceColor, z) = 1 THEN e = 3
    FOR y = 1 TO PieceSize(z)
        BlockRow = InvRow(z) + BlockRow(z, InvRotate(z), y): BlockColumn = InvColumn(z) + BlockColumn(z, InvRotate(z), y)
        LINE (c(BlockRow, BlockColumn), d(BlockRow, BlockColumn))-(c(BlockRow, BlockColumn) + 22, d(BlockRow, BlockColumn) + 22), 0, B
        PAINT (c(BlockRow, BlockColumn) + 5, d(BlockRow, BlockColumn) + 5), e, 0
        IF (e <> 3) * (e <> 15) THEN PSET (c(BlockRow, BlockColumn) + 3, d(BlockRow, BlockColumn) + 3), 15: DRAW "NR13D13"
    NEXT
NEXT

IF PlayerEndGame(PieceColor) = 1 THEN
    LOCATE 43, 97: PRINT EndGame$(PieceColor);
    LOCATE 45, 97: PRINT "Press <ENTER> to continue.";
    PressENTER2:
    A$ = INKEY$
    IF A$ = "" THEN GOTO PressENTER2
    IF ASC(A$) <> 13 THEN GOTO PressENTER2
    LOCATE 43, 97: PRINT "                             ";
    LOCATE 45, 97: PRINT "                            ";
    GOTO EndTurn
END IF

IF Begin = 1 THEN Begin = 0: GOTO DrawCursor
IF w1 = 1 THEN w1 = 0: GOTO DrawCursor

Row = 11: Column = 11: Rotate = 1

DrawCursor:
Piece = PieceList(PieceCounter): GOSUB CheckRowColumn

PSET (a(PreviousRow, PreviousColumn), b(PreviousRow, PreviousColumn)), 3: DRAW "C3" + Cursor$(PreviousPiece, PreviousRotate)
PSET (a(Row, Column), b(Row, Column)), 3: DRAW "C15" + Cursor$(Piece, Rotate)

PreviousPiece = Piece: PreviousRotate = Rotate: PreviousRow = Row: PreviousColumn = Column

GETINPUT1:
A$ = UCASE$(INKEY$)
IF A$ = "" THEN GOTO GETINPUT1

IF A$ = "I" THEN GOTO INSTRUCTIONS

IF (A$ = "N") * (PieceCounter = PieceTotal) THEN PieceCounter = 1: Rotate = 1: GOTO DrawCursor
IF A$ = "N" THEN PieceCounter = PieceCounter + 1: Rotate = 1: GOTO DrawCursor

IF (A$ = "P") * (PieceCounter = 1) THEN PieceCounter = PieceTotal: Rotate = 1: GOTO DrawCursor
IF A$ = "P" THEN PieceCounter = PieceCounter - 1: Rotate = 1: GOTO DrawCursor

IF (A$ = "R") * (Rotate = PieceRotate(Piece)) THEN Rotate = 1: GOTO DrawCursor
IF A$ = "R" THEN Rotate = Rotate + 1: GOTO DrawCursor

IF (A$ = "C") * (Rotate = 1) THEN Rotate = PieceRotate(Piece): GOTO DrawCursor
IF A$ = "C" THEN Rotate = Rotate - 1: GOTO DrawCursor

IF (Row = Top) * (A$ = CHR$(0) + CHR$(72)) THEN Row = Bottom - PieceHeight(Piece, Rotate) + 1: GOTO DrawCursor
IF A$ = CHR$(0) + CHR$(72) THEN Row = Row - 1: GOTO DrawCursor

IF (Column + PieceWidth(Piece, Rotate) - 1 = Right) * (A$ = CHR$(0) + CHR$(77)) THEN Column = Left: GOTO DrawCursor
IF A$ = CHR$(0) + CHR$(77) THEN Column = Column + 1: GOTO DrawCursor

IF (Row + PieceHeight(Piece, Rotate) - 1 = Bottom) * (A$ = CHR$(0) + CHR$(80)) THEN Row = Top: GOTO DrawCursor
IF A$ = CHR$(0) + CHR$(80) THEN Row = Row + 1: GOTO DrawCursor

IF (Column = Left) * (A$ = CHR$(0) + CHR$(75)) THEN Column = Right - PieceWidth(Piece, Rotate) + 1: GOTO DrawCursor
IF A$ = CHR$(0) + CHR$(75) THEN Column = Column - 1: GOTO DrawCursor

IF (Players = 1) * (VAL(A$) > 0) * (VAL(A$) < 3) THEN DisplayColor = VAL(A$): GOTO DisplayPieceInventory
IF (Players > 1) * (VAL(A$) > 0) * (VAL(A$) < 5) THEN DisplayColor = VAL(A$): GOTO DisplayPieceInventory

IF ASC(A$) <> 13 THEN GOTO GETINPUT1

x = 0: v = 0
FOR z = 1 TO PieceSize(Piece)
    BlockRow = Row + BlockRow(Piece, Rotate, z): BlockColumn = Column + BlockColumn(Piece, Rotate, z)
    IF FirstMove(PieceColor) = 1 THEN
        IF (Players = 1) * (PieceColor = 1) * (BlockRow = 8) * (BlockColumn = 8) THEN x = 2
        IF (Players = 1) * (PieceColor = 2) * (BlockRow = 13) * (BlockColumn = 13) THEN x = 2
        IF (Players > 1) * (PieceColor = 1) * (BlockRow = 1) * (BlockColumn = 1) THEN x = 2
        IF (Players > 1) * (PieceColor = 2) * (BlockRow = 1) * (BlockColumn = 20) THEN x = 2
        IF (Players > 1) * (PieceColor = 3) * (BlockRow = 20) * (BlockColumn = 20) THEN x = 2
        IF (Players > 1) * (PieceColor = 4) * (BlockRow = 20) * (BlockColumn = 1) THEN x = 2
    ELSE IF BoardColor(BlockRow, BlockColumn) > 0 THEN v = 1
    END IF
NEXT
IF ((FirstMove(PieceColor) = 1) * (x < 2)) + ((FirstMove(PieceColor) = 0) * (v = 1)) THEN GOTO GETINPUT1

IF FirstMove(PieceColor) = 1 THEN GOTO DrawPiece

x = 0
FOR z = 1 TO PieceCorner(Piece)
    CornerRow = Row + CornerRow(Piece, Rotate, z): CornerColumn = Column + CornerColumn(Piece, Rotate, z)
    IF (CornerRow >= Top) * (CornerRow <= Bottom) * (CornerColumn >= Left) * (CornerColumn <= Right) THEN IF BoardColor(CornerRow, CornerColumn) = PieceColor THEN x = 1
NEXT
IF x = 0 THEN GOTO GETINPUT1

x = 0
FOR z = 1 TO PieceSide(Piece)
    SideRow = Row + SideRow(Piece, Rotate, z): SideColumn = Column + SideColumn(Piece, Rotate, z)
    IF (SideRow >= Top) * (SideRow <= Bottom) * (SideColumn >= Left) * (SideColumn <= Right) THEN IF BoardColor(SideRow, SideColumn) = PieceColor THEN x = 1
NEXT
IF x = 1 THEN GOTO GETINPUT1

DrawPiece:
FOR z = 1 TO PieceSize(Piece)
    BlockRow = Row + BlockRow(Piece, Rotate, z): BlockColumn = Column + BlockColumn(Piece, Rotate, z)
    PAINT (a(BlockRow, BlockColumn) + 10, b(BlockRow, BlockColumn) + 10), PieceColor(PieceColor), 0
    PSET (a(BlockRow, BlockColumn) + 5, b(BlockRow, BlockColumn) + 5), 15: DRAW "NR20D20"
    BoardColor(BlockRow, BlockColumn) = PieceColor
NEXT

LOCATE 45, 97: PRINT "Press <ENTER> to continue.";

GETENTER1:
A$ = UCASE$(INKEY$)
IF A$ = "" THEN GOTO GETENTER1
IF A$ = "U" THEN
    FOR z = 1 TO PieceSize(Piece)
        BlockRow = Row + BlockRow(Piece, Rotate, z): BlockColumn = Column + BlockColumn(Piece, Rotate, z): x1 = 8
        IF (FirstMove(PieceColor) = 1) * (Players = 1) * (PieceColor = 1) * (BlockRow = 8) * (BlockColumn = 8) THEN x1 = 5
        IF (FirstMove(PieceColor) = 1) * (Players = 1) * (PieceColor = 2) * (BlockRow = 13) * (BlockColumn = 13) THEN x1 = 4
        IF (FirstMove(PieceColor) = 1) * (Players > 1) * (PieceColor = 1) * (BlockRow = 1) * (BlockColumn = 1) THEN x1 = 9
        IF (FirstMove(PieceColor) = 1) * (Players > 1) * (PieceColor = 2) * (BlockRow = 1) * (BlockColumn = 20) THEN x1 = 7
        IF (FirstMove(PieceColor) = 1) * (Players > 1) * (PieceColor = 3) * (BlockRow = 20) * (BlockColumn = 20) THEN x1 = 12
        IF (FirstMove(PieceColor) = 1) * (Players > 1) * (PieceColor = 4) * (BlockRow = 20) * (BlockColumn = 1) THEN x1 = 2
        PAINT (a(BlockRow, BlockColumn) + 10, b(BlockRow, BlockColumn) + 10), x1, 0
        BoardColor(BlockRow, BlockColumn) = 0
    NEXT
    LOCATE 45, 97: PRINT "                             ";
    GOTO GETINPUT1
END IF
IF ASC(A$) <> 13 THEN GOTO GETENTER1

LOCATE 45, 97: PRINT "                             ";

LastPiece(PieceColor) = Piece
PiecesLeft(PieceColor) = PiecesLeft(PieceColor) - 1
HasPlayed(PieceColor, Piece) = 1
UnplayedPieces(PieceColor, Piece) = 0

EndTurn:
IF (Players = 3) * (PieceColor = 4) * (SubPlayer = 3) THEN
    SubPlayer = 1
ELSEIF (Players = 3) * (PieceColor = 4) THEN
    SubPlayer = SubPlayer + 1
END IF

FirstMove(PieceColor) = 0
PieceColor = PieceColor + 1
IF PieceColor > MaxPlayers THEN PieceColor = 1

IF (Players < 3) * (Player = 1) THEN
    Player = 2
ELSEIF Players < 3 THEN
    Player = 1
ELSEIF Player = 4 THEN
    Player = 1
ELSE Player = Player + 1
END IF

GOTO BeginTurn

CheckRowColumn:
IF Column + PieceWidth(Piece, Rotate) - 1 > Right THEN Column = Right - PieceWidth(Piece, Rotate) + 1
IF Row + PieceHeight(Piece, Rotate) - 1 > Bottom THEN Row = Bottom - PieceHeight(Piece, Rotate) + 1
RETURN

DisplayPieceInventory:
FOR z = 1 TO 21
    e = PieceColor(DisplayColor)
    IF HasPlayed(DisplayColor, z) = 1 THEN e = 3
    FOR y = 1 TO PieceSize(z)
        BlockRow = InvRow(z) + BlockRow(z, InvRotate(z), y): BlockColumn = InvColumn(z) + BlockColumn(z, InvRotate(z), y)
        LINE (c(BlockRow, BlockColumn), d(BlockRow, BlockColumn))-(c(BlockRow, BlockColumn) + 22, d(BlockRow, BlockColumn) + 22), 0, B
        PAINT (c(BlockRow, BlockColumn) + 5, d(BlockRow, BlockColumn) + 5), e, 0
        IF e <> 3 THEN PSET (c(BlockRow, BlockColumn) + 3, d(BlockRow, BlockColumn) + 3), 15: DRAW "NR13D13"
    NEXT
NEXT

LOCATE 43, 96: PRINT DisplayingColor$(DisplayColor);
LOCATE 45, 97: PRINT "Press <ENTER> to continue.";

GETENTER:
A$ = INKEY$
IF A$ = "" THEN GOTO GETENTER
IF ASC(A$) <> 13 THEN GOTO GETENTER

LOCATE 43, 96: PRINT "                               ";
LOCATE 45, 97: PRINT "                             ";

Begin = 1: GOTO DrawInventoryPieces

INSTRUCTIONS:
LINE (738, 80)-(1007, 732), 6, BF
LOCATE 10, 101: PRINT "Keyboard  Commands";
LOCATE 12, 97: PRINT "--------------------------";
LOCATE 14, 97: PRINT "<ARROW KEYS> moves Cursor";
LOCATE 15, 99: PRINT "Up, Down, Right, Left.";
LOCATE 17, 97: PRINT "<N> Next avaliable Piece.";
LOCATE 19, 95: PRINT "<P> Previous available Piece.";
LOCATE 21, 97: PRINT "<R> Rotate Piece Clockwise.";
LOCATE 23, 94: PRINT "<C> Rotate Piece Counter Clkwise.";
LOCATE 25, 104: PRINT "Blokus Duo";
LOCATE 26, 95: PRINT "<1> Displays Magenta's Pieces.";
LOCATE 27, 95: PRINT "<2> Displays Orange's Pieces."
LOCATE 29, 103: PRINT "4 Color Game";
LOCATE 30, 96: PRINT "<1> Displays Blue's Pieces.";
LOCATE 31, 95: PRINT "<2> Displays Yellow's Pieces.";
LOCATE 32, 97: PRINT "<3> Displays Red's Pieces.";
LOCATE 33, 96: PRINT "<4> Displays Green's Pieces.";
LOCATE 35, 95: PRINT "<ENTER> to play Piece on Board.";
LOCATE 37, 96: PRINT "After playing Piece on Board.";
LOCATE 39, 99: PRINT "<U> Undo Piece Played.";
LOCATE 41, 100: PRINT "<ENTER> to End Turn.";
LOCATE 43, 97: PRINT "--------------------------";
LOCATE 45, 97: PRINT "Press <ENTER> to continue.";

GETENTER2:
A$ = INKEY$
IF A$ = "" THEN GOTO GETENTER2
IF ASC(A$) <> 13 THEN GOTO GETENTER2
LINE (738, 100)-(1007, 732), 6, BF
w1 = 1
GOTO DrawInventoryPieces

Scores:
PSET (a(PreviousRow, PreviousColumn), b(PreviousRow, PreviousColumn)), 3: DRAW "C3" + Cursor$(PreviousPiece, PreviousRotate)
LINE (738, 30)-(1007, 732), 6, BF
LOCATE 5, 104: PRINT "S C O R E S";

IF PiecesLeft(1) = 0 THEN PlayAllPieces(1) = 15 ELSE PlayAllPieces(1) = 0
IF PiecesLeft(2) = 0 THEN PlayAllPieces(2) = 15 ELSE PlayAllPieces(2) = 0
IF LastPiece(1) = 1 THEN LastPieceBonus(1) = 5 ELSE LastPieceBonus(1) = 0
IF LastPiece(2) = 1 THEN LastPieceBonus(2) = 5 ELSE LastPieceBonus(2) = 0
LeftOnBoard(1) = 0: LeftOnBoard(2) = 0
FOR z = 1 TO 21
    IF UnplayedPieces(1, z) = 1 THEN LeftOnBoard(1) = LeftOnBoard(1) - PieceSize(z)
    IF UnplayedPieces(2, z) = 1 THEN LeftOnBoard(2) = LeftOnBoard(2) - PieceSize(z)
NEXT
ColorScore(1) = PlayAllPieces(1) + LastPieceBonus(1) + LeftOnBoard(1)
ColorScore(2) = PlayAllPieces(2) + LastPieceBonus(2) + LeftOnBoard(2)

IF Players > 1 THEN
    IF PiecesLeft(3) = 0 THEN PlayAllPieces(3) = 15 ELSE PlayAllPieces(3) = 0
    IF PiecesLeft(4) = 0 THEN PlayAllPieces(4) = 15 ELSE PlayAllPieces(4) = 0
    IF LastPiece(3) = 1 THEN LastPieceBonus(3) = 5 ELSE LastPieceBonus(3) = 0
    IF LastPiece(4) = 1 THEN LastPieceBonus(4) = 5 ELSE LastPieceBonus(4) = 0
    LeftOnBoard(3) = 0: LeftOnBoard(4) = 0
    FOR z = 1 TO 21
        IF UnplayedPieces(3, z) = 1 THEN LeftOnBoard(3) = LeftOnBoard(3) - PieceSize(z)
        IF UnplayedPieces(4, z) = 1 THEN LeftOnBoard(4) = LeftOnBoard(4) - PieceSize(z)
    NEXT
    ColorScore(3) = PlayAllPieces(3) + LastPieceBonus(3) + LeftOnBoard(3)
    ColorScore(4) = PlayAllPieces(4) + LastPieceBonus(4) + LeftOnBoard(4)
END IF

IF Players = 1 THEN
    PlayerScore(1) = ColorScore(1)
    PlayerScore(2) = ColorScore(2)
ELSEIF Players = 2 THEN
    PlayerScore(1) = ColorScore(1) + ColorScore(3)
    PlayerScore(2) = ColorScore(2) + ColorScore(4)
ELSE
    PlayerScore(1) = ColorScore(1)
    PlayerScore(2) = ColorScore(2)
    PlayerScore(3) = ColorScore(3)
    PlayerScore(4) = ColorScore(4)
END IF

IF (Players < 3) * (PlayerScore(1) > PlayerScore(2)) THEN
    Winner = 1
ELSEIF (Players < 3) * (PlayerScore(2) > PlayerScore(1)) THEN
    Winner = 2
ELSEIF (Players > 2) * (PlaerScore(1) > PlayerScore(2)) * (PlayerScore(1) > PlayerScore(3)) * (PlayerScore(1) > PlayerScore(4)) THEN
    Winner = 1
ELSEIF (Players > 2) * (PlaerScore(2) > PlayerScore(1)) * (PlayerScore(2) > PlayerScore(3)) * (PlayerScore(2) > PlayerScore(4)) THEN
    Winner = 2
ELSEIF (Players > 2) * (PlaerScore(3) > PlayerScore(1)) * (PlayerScore(3) > PlayerScore(2)) * (PlayerScore(3) > PlayerScore(4)) THEN
    Winner = 3
ELSEIF (Players > 2) * (PlaerScore(4) > PlayerScore(1)) * (PlayerScore(4) > PlayerScore(2)) * (PlayerScore(4) > PlayerScore(3)) THEN
    Winner = 4
ELSE Winner = 5
END IF

IF Players = 1 THEN
    LOCATE 14, 105: PRINT "Player  1";
    LOCATE 16, 103: PRINT "Magenta Pieces";
    LOCATE 17, 98: PRINT "Play all Pieces:      "; PlayAllPieces(1);
    LOCATE 18, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(1);
    LOCATE 19, 98: PRINT "Pieces left on Board: "; LeftOnBoard(1);
    LOCATE 21, 98: PRINT "Player 1's Score:     "; PlayerScore(1);
    LOCATE 25, 105: PRINT "Player  2";
    LOCATE 27, 103: PRINT "Orange Pieces";
    LOCATE 28, 98: PRINT "Play all Pieces:      "; PlayAllPieces(2);
    LOCATE 29, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(2);
    LOCATE 30, 98: PRINT "Pieces left on Board: "; LeftOnBoard(2);
    LOCATE 32, 98: PRINT "Player 2's Score:     "; PlayerScore(2);
ELSEIF Players = 2 THEN
    LOCATE 8, 105: PRINT "Player  1";
    LOCATE 10, 104: PRINT "Blue's Pieces";
    LOCATE 11, 98: PRINT "Play all Pieces:      "; PlayAllPieces(1);
    LOCATE 12, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(1);
    LOCATE 13, 98: PRINT "Pieces left on Board: "; LeftOnBoard(1);
    LOCATE 14, 98: PRINT "Blue's Score:         "; ColorScore(1);
    LOCATE 16, 105: PRINT "Red's Pieces";
    LOCATE 17, 98: PRINT "Play all Pieces:      "; PlayAllPieces(3);
    LOCATE 18, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(3);
    LOCATE 19, 98: PRINT "Pieces left on Board: "; LeftOnBoard(3);
    LOCATE 20, 98: PRINT "Red's Score:          "; ColorScore(3);
    LOCATE 22, 98: PRINT "Player 1's Score:     "; PlayerScore(1);
    LOCATE 25, 105: PRINT "Player  2";
    LOCATE 27, 102: PRINT "Yellow's Pieces";
    LOCATE 28, 98: PRINT "Play all Pieces:      "; PlayAllPieces(2);
    LOCATE 29, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(2);
    LOCATE 30, 98: PRINT "Pieces left on Board: "; LeftOnBoard(2);
    LOCATE 31, 98: PRINT "Yellow's Score:       "; ColorScore(2);
    LOCATE 33, 103: PRINT "Green's Pieces";
    LOCATE 34, 98: PRINT "Play all Pieces:      "; PlayAllPieces(4);
    LOCATE 35, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(4);
    LOCATE 36, 98: PRINT "Pieces left on Board: "; LeftOnBoard(4);
    LOCATE 37, 98: PRINT "Green's Score:        "; ColorScore(4);
    LOCATE 39, 98: PRINT "Player 2's Score:     "; PlayerScore(2);
ELSE
    LOCATE 9, 105: PRINT "Player  1";
    LOCATE 11, 104: PRINT "Blue's Pieces";
    LOCATE 12, 98: PRINT "Play all Pieces:      "; PlayAllPieces(1);
    LOCATE 13, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(1);
    LOCATE 14, 98: PRINT "Pieces left on Board: "; LeftOnBoard(1);
    LOCATE 15, 98: PRINT "Player 1's Score:     "; PlayerScore(1);
    LOCATE 17, 105: PRINT "Player  2";
    LOCATE 19, 105: PRINT "Red's Pieces";
    LOCATE 20, 98: PRINT "Play all Pieces:      "; PlayAllPieces(2);
    LOCATE 21, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(2);
    LOCATE 22, 98: PRINT "Pieces left on Board: "; LeftOnBoard(2);
    LOCATE 23, 98: PRINT "Player 2's Score:     "; PlayerScore(2);
    LOCATE 25, 105: PRINT "Player  3";
    LOCATE 27, 102: PRINT "Yellow's Pieces";
    LOCATE 28, 98: PRINT "Play all Pieces:      "; PlayAllPieces(3);
    LOCATE 29, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(3);
    LOCATE 30, 98: PRINT "Pieces left on Board: "; LeftOnBoard(3);
    LOCATE 31, 98: PRINT "Player 3's Score:     "; PlayerScore(3);
    LOCATE 33, 105: PRINT "Player  4";
    LOCATE 35, 103: PRINT "Green's Pieces";
    LOCATE 36, 98: PRINT "Play all Pieces:      "; PlayAllPieces(4);
    LOCATE 37, 98: PRINT "Last Piece Bonus:     "; LastPieceBonus(4);
    LOCATE 38, 98: PRINT "Pieces left on Board: "; LeftOnBoard(4);
    LOCATE 39, 98: PRINT "Player 4's Score:     "; PlayerScore(4);
END IF

LOCATE 43, 98
IF Winner = 5 THEN PRINT "The Game Ended in a Tie."; ELSE PRINT "Player"; Winner; "is the Winner!!";

LOCATE 45, 98: PRINT "Play Another Game? (Y/N)";

PLAYAGAIN:
A$ = UCASE$(INKEY$)
IF A$ = "" THEN GOTO PLAYAGAIN
IF A$ = "Y" THEN RUN
IF A$ = "N" THEN END
IF (Players = 1) * (VAL(A$) > 0) * (VAL(A$) < 3) THEN DisplayColor = VAL(A$): GOTO DisplayPieces
IF (Players > 1) * (VAL(A$) > 0) * (VAL(A$) < 5) THEN DisplayColor = VAL(A$): GOTO DisplayPieces
GOTO PLAYAGAIN

DisplayPieces:
LINE (738, 30)-(1007, 732), 6, BF
FOR z = 1 TO 21
    e = PieceColor(DisplayColor)
    IF HasPlayed(DisplayColor, z) = 1 THEN e = 3
    FOR y = 1 TO PieceSize(z)
        BlockRow = InvRow(z) + BlockRow(z, InvRotate(z), y): BlockColumn = InvColumn(z) + BlockColumn(z, InvRotate(z), y)
        LINE (c(BlockRow, BlockColumn), d(BlockRow, BlockColumn))-(c(BlockRow, BlockColumn) + 22, d(BlockRow, BlockColumn) + 22), 0, B
        PAINT (c(BlockRow, BlockColumn) + 5, d(BlockRow, BlockColumn) + 5), e, 0
        IF e <> 3 THEN PSET (c(BlockRow, BlockColumn) + 3, d(BlockRow, BlockColumn) + 3), 15: DRAW "NR13D13"
    NEXT
NEXT
LOCATE 45, 97: PRINT "Press <ENTER> to continue.";

GETENTER6:
A$ = INKEY$
IF A$ = "" THEN GOTO GETENTER6
IF ASC(A$) <> 13 THEN GOTO GETENTER6
GOTO Scores
   
.bas  Blokus.bas (Size: 41.42 KB / Downloads: 30)
Find all posts by this user
Like Post
10-23-2014, 06:58 AM (This post was last modified: 10-23-2014 07:10 AM by Anthony.R.Brown.)
Post: #2
 (Print Post)
RE: Blokus Board Game in QB64
Fantastic Donald Smile

I will have to at some time get round to Making & Posting My Game that I have invented! and maybe you can help me with the Graphics...as I can See it's a Strength of yours.

Again I love your Simple looking Games which can have Complex Game Play! for some reason modern Game designers think that Games have to have Explosions & loads of Bling to be Good ? 

Keep up the Great work you are doing!

P.S have you ever thought about making a Version the Game GO ? The smaller (9 x 9) Version would be a Good start!

http://en.wikipedia.org/wiki/Go_(game)

Below 9 x 9

http://www.societies.cam.ac.uk/cugos/go/rules_06.html

http://senseis.xmp.net/?9x9Strategy



Anthony.
Find all posts by this user
Like Post
10-23-2014, 08:44 AM
Post: #3
 (Print Post)
RE: Blokus Board Game in QB64
I actually started making a Go game on my Tandy 2000 many years ago. I had the board and pieces done and players alternated putting stones on the board. But, being able to determine if a players stones are completely surrounded got a bit complicated, so I never finished the game.

A nice stone game that I did finish back then you might know is Pente. A very easy game to make. It's a five in a row game or you can win by collecting pairs of stones. I haven't gotten around to remaking this one yet.

Two other great games I wrote back then were Shogi, which is Japanese Chess. Where players plays with tiles laying on each end of the board facing their opponante. The pieces and the board setup slight different from Western Chess, but the rules are pretty much the same. One major difference is when you capture an oppenantes pieces, that piece is not out of the game. But belongs to you now and you can drop in back in the game agains your opponante.

Chase is not played like Chess at all, but it's just as challenging to play as Chess. It's played on a 9x9 hex board, but the game board has no boundries. The board is made into a cylinder and when a piece goes off one end of the board, it coninues i's move on the other side. Also the top and bottom of he board are pointed, so when a piece is traveling towards the end of the board, it continues it's move back up the other direction. The game is played with 10 dice numbered 1 2 3 4 5 4 3 2 1 along the bottom edge of the board wih thenth dice out of play at the moment. Pieces move in a stright line the total number on the dice without jumping over pieces in all six directions. There the pain move where it moves to an empty space. A capture when landing on your opponantes piece. A bump move when landing on our own piece. Two pieces beside eachother can swap values. And the chamber move by landing in the center of the board by exact count, allows you to bring more pieces onto the board. All of the pices totaled together is 25. You must maintain 25 points on the board at all time. If one of your pieces is captured, you must make up the difference by increasing other pieces values. When you get down to 4 pieces left, you've lost the game. It's challenging because there's a lot to pay attention to. For instance, the piece on the other side of the board is right beside you and if it's value is a 1, it can capture you on it's next move.

Thank you Anthony for your input.
Find all posts by this user
Like Post




Forum Jump:


User(s) browsing this thread: 1 Guest(s)