Hi Annette,
I'm not an expert in this situation but I'd be pessimistic.
Apparently, there are 3 R's when buying things (according to the consumer affairs expert on Newstalk 106) - Repair, Replace, Refund.
You got a 6 month warranty & the dealer did 'replace' the engine. Once the 6 months were up, I'd suggest he has no responsibility to you. I'm ignoring the morality of what he did.
If it happens again, I'd reject the car, in writing, after a short time.
Sorry but maybe someone else has a more positive opinion.
Sluice