TizzyT

ChessServer API -TizzyT

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