Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub PrecomputedMoveData()
- 'Generates the squares from the edge of the board in each direction for each square
- For File = 0 To 7
- For Rank = 0 To 7
- Dim NSWE() As Byte = {7 - Rank, Rank, 7 - File, File}
- Dim SquareIndex As Byte = Rank * 8 + File
- NumSquaresToEdgeSliding(SquareIndex) = New Byte() {NSWE(0), NSWE(1), NSWE(2), NSWE(3), Math.Min(NSWE(0), NSWE(2)), Math.Min(NSWE(1), NSWE(3)), Math.Min(NSWE(0), NSWE(3)), Math.Min(NSWE(1), NSWE(2))}
- Next
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement