Add SIDE_LENGTH constant (and use it); fix diagonal movement check