simple chess game using javascript