Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'When sending a move to the server, the move is in the form of 2 bytes.
- 'The first byte specifies where the target piece currently resides.
- 'The second byte specified where the target piece will try to move to.
- 'Example: assuming there is a bishop on A5 and we want to move it to C7 we would send the following 2 bytes: {15,37}.
- 'Example: if a player resigns they send the following 2 bytes (assuming the king is on A1): {11,99}.
- 'Example: if a pawn is about to get promoted to a queen by moving forward then it might look like the following: {17,101).
- 'Possible Moves in chess
- Public Enum Move As Byte
- IM = 0 'Opponent made an Illegal Move
- A1 = 11
- A2 = 12
- A3 = 13
- A4 = 14
- A5 = 15
- A6 = 16
- A7 = 17
- A8 = 18
- B1 = 21
- B2 = 22
- B3 = 23
- B4 = 24
- B5 = 25
- B6 = 26
- B7 = 27
- B8 = 28
- C1 = 31
- C2 = 32
- C3 = 33
- C4 = 34
- C5 = 35
- C6 = 36
- C7 = 37
- C8 = 38
- D1 = 41
- D2 = 42
- D3 = 43
- D4 = 44
- D5 = 45
- D6 = 46
- D7 = 47
- D8 = 48
- E1 = 51
- E2 = 52
- E3 = 53
- E4 = 54
- E5 = 55
- E6 = 56
- E7 = 57
- E8 = 58
- F1 = 61
- F2 = 62
- F3 = 63
- F4 = 64
- F5 = 65
- F6 = 66
- F7 = 67
- F8 = 68
- G1 = 71
- G2 = 72
- G3 = 73
- G4 = 74
- G5 = 75
- G6 = 76
- G7 = 77
- G8 = 78
- H1 = 81
- H2 = 82
- H3 = 83
- H4 = 84
- H5 = 85
- H6 = 86
- H7 = 87
- H8 = 88
- 'King special moves
- RD = 90 'Request Draw, specified in the second byte of move
- AD = 91 'Accept Draw, specified in the second byte of move
- DD = 92 'Deny Draw, specified in the second byte of move
- CK = 93 'Castle King Side, specified in the second byte of move
- CQ = 94 'Castle Queen Side, specified in the second byte of move
- RS = 99 'Resign
- 'Pawn special moves
- QL = 100 'Promote to queen after left capture, specified in the second byte of move
- QC = 101 'Promote to queen after moving forward, specified in the second byte of move
- QR = 103 'Promote to queen after right capture, specified in the second byte of move
- KL = 104 'Promote to knight after left capture, specified in the second byte of move
- KC = 105 'Promote to knight after moving forward, specified in the second byte of move
- KR = 106 'Promote to knight after right capture, specified in the second byte of move
- RL = 107 'Promote to rook after left capture, specified in the second byte of move
- RC = 108 'Promote to rook after moving forward, specified in the second byte of move
- RR = 109 'Promote to rook after right capture, specified in the second byte of move
- BL = 110 'Promote to bishop after left capture, specified in the second byte of move
- BC = 111 'Promote to bishop after moving forward, specified in the second byte of move
- BR = 112 'Promote to bishop after right capture, specified in the second byte of move
- EP = 119 'En Passant, specified in the second byte of move
- End Enum
Advertisement
Add Comment
Please, Sign In to add comment