Adding legality checking for pieces, improving prettyPrint(), making pieces comparable based on material value.