Card game engine written in Javascript