Bug fix, now runnable as application

Fixed bug that allows AI to make moves that leave the king in check.
Also added main method to allow project to be run as application and
exported as runnable JAR.