Try fo fit move_t in 16 bits ? #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ideas:
move_do()
)We would be left with:
KNIGHT + promoted_piece
(piece == PAWN && to == ep)
will do the trickto == from+2
orto == from - 2
flags capture, double push, and promotion removed in
ec2d229
.Left to do:
Done in
ffd5d05
:2 bits left to save to fit into 2 octets (16-bits).
Since
ffd5d05
, flags are values (not bitmasks) meaning that we currently have one unused value in flags (the value 3, using 2 bits). We can use this value to flag promotion.Other ideas "save bits" :
If promoted piece uses only 2 bits, we can :
En-passant flag can be removed if we test that piece is pawn and dest square is en-passant square.
Castling flag can be removed with some changes in move_do, one of :
If we know the moving piece type, we can use the same flag value for different pieces (e.g en-passant and castling)
Finished with
a2451d79db