Chess in JavaScript/Angular