Changes

Jump to: navigation, search

0x88

21 bytes added, 16:46, 24 May 2019
no edit summary
==<span id="SquareRelations"></span>Square Relations==
The difference of valid 0x88 coordinates A and B is uniquely with respect to [[Distance|distance]] and [[Direction|direction]], which is not true for classical packed three bit rank and file coordinates (for instance -+7 may occur on [[Ranks|ranks]], [[Anti-Diagonals|anti-diagonals]]). That makes lookups for [[Distance|distance]], [[Manhattan-Distance|Manhattan-distance]], possible piece attacks and that like, much more resource friendly. While classical square coordinates in the 0..63 range require 4K (64*64) sized tables, the 0x88 difference takes 1/16 or 256 sized tables - or even 16 less.
An offset of 119 (0x77 as max valid square index) is added, to make +-119 a 0..238 range (size of 240 for alignment reasons).

Navigation menu