Well, we've got a somewhat working state, still not sure if NegaMax is working or there's some problem on the move generation. Plus, there needs to be a castling move.

Time to go sleep.