JS implementation of Tchoukaillon, with a vs. AI option