aboutsummaryrefslogtreecommitdiff
path: root/src/bitboard.ha
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-06-26 20:01:36 +0300
committereug-vs <eugene@eug-vs.xyz>2023-06-26 20:01:36 +0300
commit72761f770a73e3e8fac9b57043ed19f084bfb230 (patch)
treebc482dc87dfbddd4cd9a71461d37e9dde41cfb45 /src/bitboard.ha
parentc3474b1481a02baefda1abe286d4fbef39597bce (diff)
downloadj1chess-tmp.tar.gz
tmp: save progress from @black-pearltmp
Diffstat (limited to 'src/bitboard.ha')
-rw-r--r--src/bitboard.ha15
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);
+
+};