Time for action – build a GamePiece class - declarations
Switch back to your Visual Studio window if you have your image editor open.
Right-click on the Flood Control project in Solution Explorer and select Add | Class….
Name the class
GamePiece.vb
, and click on Add.Add the following declarations to the (currently empty) class:
Public Shared PieceTypes() As String = { "Left,Right", "Top,Bottom", "Left,Top", "Top,Right", "Right,Bottom", "Bottom,Left", "Empty" } Public Const PieceHeight As Integer = 40 Public Const PieceWidth As Integer = 40 Public Const MaxPlayablePieceIndex As Integer = 5 Public Const EmptyPieceIndex As Integer = 6 Private Const textureOffsetX As Integer = 1 Private Const textureOffsetY As Integer = 1 Private Const texturePaddingX As Integer = 1 Private Const texturePaddingY As Integer = 1 Private _pieceType As String = "" Private _pieceSuffix As String = ""
Add two properties to retrieve information about the piece...