Magic the Gathering engine written in JS