Chess Game in Javascript with Crazyhouse rules