Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public MustInherit Class Piece
- 'VARIABLES USEFUL FOR A PIECE
- Protected LegalMoves As ULong
- Protected SquareLocation As Integer
- Protected Dead As Boolean = False
- Protected NomMoved As Integer
- Protected PromotedPiece As Boolean = False
- 'CONSTRUCTOR FOR GENERATING A PIECE
- Sub New(StartSquare As Integer, PP As Boolean)
- SquareLocation = StartSquare
- PromotedPiece = PP
- End Sub
- 'FUNCTIONS A PIECE MUST HAVE BUT IS SPECIFIC TO THE PIECE
- MustOverride Sub CalculateMove(VBitboard As Bitboard, GenTurn As Turn)
- MustOverride Function GetPieceType() As Integer
- 'GETTER AND SETTER METHODS FOR ACCESSING VARIABLES
- Public Property GetSetSquareLocation As Integer
- Get
- Return SquareLocation
- End Get
- Set(value As Integer)
- SquareLocation = value
- End Set
- End Property
- Public Property GetSetDead As Boolean
- Get
- Return Dead
- End Get
- Set(value As Boolean)
- Dead = value
- End Set
- End Property
- Public Property GetSetNomPieceMoved As Integer
- Get
- Return NomMoved
- End Get
- Set(value As Integer)
- NomMoved = value
- End Set
- End Property
- Public Function GetLegalMoves() As ULong
- If Dead = False Then
- Return LegalMoves
- Else
- Return Nothing
- End If
- End Function
- Public Function GetPromotedPiece()
- Return PromotedPiece
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement