added showLegalMovesEnabled flag