add chess algorithm