Libraryless. Click here for Pure Java version (1840L/12K).
1 | static Pair<Int> chess_squareToPos(S square) { |
2 | if (square == null) null; |
3 | assertLength(2, square); |
4 | ret pair(charDiff(upper(first(square)), 'A'), 8-charDiff(second(square), '0')); |
5 | } |
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: | #1024694 |
Snippet name: | chess_squareToPos |
Eternal ID of this version: | #1024694/1 |
Text MD5: | 141db37d3da7d1e02216625e7c7863c5 |
Transpilation MD5: | b4b22550ca5efc05ea2c87d16df452e2 |
Author: | stefan |
Category: | javax / chess |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-24 08:40:01 |
Source code size: | 191 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 252 / 346 |
Referenced in: | [show references] |