fix bug in castle move generation
switch to native go for bitwise ops