I'm trying to save memory by storing a game's 8x8 board as a binary value but am having trouble:
Each square on the board can be either 10
(black), 11
(white), or 00
(empty) and there are 64 squares. That's 128 binary digits so this should be 16 bytes (128/8) right?
How do I handle that in solidity? Would I say bytes16 foo = 0b10111000...
?
Anyone have a link or advice with working directly with bytes in solidity?
Ultimately I'd like to use them as keys in a mapping...