Python chess program ported to Java