a simple chess game written in javascript