Transpiled version (66L) is out of date.
1 | sS chess_parseFENSymbol(char c) { |
2 | if (isUpper(c)) |
3 | ret "white " + chess_parseFENSymbol2(lower(c)); |
4 | else if (isLower(c)) |
5 | ret "black " + chess_parseFENSymbol2(c); |
6 | else |
7 | ret "empty"; |
8 | } |
9 | |
10 | sS chess_parseFENSymbol2(char c) { |
11 | if (c == 'k') ret "king"; |
12 | if (c == 'q') ret "queen"; |
13 | if (c == 'r') ret "rook"; |
14 | if (c == 'n') ret "knight"; |
15 | if (c == 'b') ret "bishop"; |
16 | if (c == 'p') ret "pawn"; |
17 | ret str(c); // unknown |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024762 |
Snippet name: | chess_parseFENSymbol |
Eternal ID of this version: | #1024762/4 |
Text MD5: | c2da8aa40e2a49a278c038f6d03f3738 |
Author: | stefan |
Category: | javax / chess |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-26 14:35:53 |
Source code size: | 450 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 234 / 343 |
Version history: | 3 change(s) |
Referenced in: | [show references] |