EnigmaticCam
Smash Ace
Ok, so I'm trying to write a chess engine in VB.Net 2005. Yes, I know it's not the greatest environment to make a chess engine, but it's just for fun.
Anyways, I'm using bitboards to help calculate moves as quickly as possible. If you're not familiar with bitboards, they are basically very large numbers that are binary representations of the board in a current position.
My problem is that a bitboard has to hold a value from 2^0 to 2^64-1 (which I can do just fine storing it in an unsigned long), yet when I attempt to AND any number equal to or greater than 2^63, I get an overflow exception. Basically, the AND bitwise operator is limited to numbers lower than 2^63, and I can't find an alternative.
Anybody here who can help me out?
Anyways, I'm using bitboards to help calculate moves as quickly as possible. If you're not familiar with bitboards, they are basically very large numbers that are binary representations of the board in a current position.
My problem is that a bitboard has to hold a value from 2^0 to 2^64-1 (which I can do just fine storing it in an unsigned long), yet when I attempt to AND any number equal to or greater than 2^63, I get an overflow exception. Basically, the AND bitwise operator is limited to numbers lower than 2^63, and I can't find an alternative.
Anybody here who can help me out?