diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-06-26 20:01:36 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-06-26 20:01:36 +0300 |
commit | 72761f770a73e3e8fac9b57043ed19f084bfb230 (patch) | |
tree | bc482dc87dfbddd4cd9a71461d37e9dde41cfb45 /src/bitboard.ha | |
parent | c3474b1481a02baefda1abe286d4fbef39597bce (diff) | |
download | j1chess-72761f770a73e3e8fac9b57043ed19f084bfb230.tar.gz |
tmp: save progress from @black-pearltmp
Diffstat (limited to 'src/bitboard.ha')
-rw-r--r-- | src/bitboard.ha | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bitboard.ha b/src/bitboard.ha new file mode 100644 index 0000000..8af3403 --- /dev/null +++ b/src/bitboard.ha @@ -0,0 +1,15 @@ +use fmt; + +fn printBitboard(bb: u64) void = { + for (let i = 0; i < 64; i+= 1) { + fmt::printfln("{}", ((bb >> i) & 1) && '1' || '.'); + }; + // if ((index + 1) % 8 == 0) { + // }; +}; + +@test fn printBitboard() void = { + let bb: u64 = 123u64; + printBitboard(bb); + +}; |