Refactor to change cards array in place when making melds