A chess implementation in JavaScript