Handle the case where gridAfterMove return null (end game), give it a large penalty