Chess engine written in Javascript