Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1024694 // chess_squareToPos

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1840L/12K).

static Pair<Int> chess_squareToPos(S square) {
  if (square == null) null;
  assertLength(2, square);
  ret pair(charDiff(upper(first(square)), 'A'), 8-charDiff(second(square), '0'));
}

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: 253 / 346
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)