Chess Board API in JavaScript