diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 856d775f..1d90292c 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -1,13 +1,8 @@ -namespace Bitboards { void init(); } - int A[8]; int B[8]; int C; -/// Bitboards::init() initializes various bitboard tables. It is called at -/// startup and relies on global objects to be already zero-initialized. - -void Bitboards::init() { +void init() { for (int f = 0; f <= 7; ++f) A[f] = f > 0 ? A[f - 1] << 1 : 0x01010101; diff --git a/src/main.cpp b/src/main.cpp index a7a38d1a..544f77cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,2 +1,2 @@ -namespace Bitboards { void init(); } -int main() { Bitboards::init(); } +extern void init(); +int main() { init(); }