Implement Ouk Chaktrang's counting rules
authorAda Joule <ada.fulmina@gmail.com>
Fri, 9 Sep 2022 11:01:04 +0000 (18:01 +0700)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 17 Sep 2022 13:51:04 +0000 (15:51 +0200)
commit6c0ca3a3d9c3b50fb22f4215e184da86cef9dd75
treed56fcb5c1fbaf6d5563bdf6d6127adc959f67020
parent7561e85219f8b1ec0dc09f921f3fdcabd3a4a173
Implement Ouk Chaktrang's counting rules

According to Article 5, Item 5 of this document.
https://docs.google.com/document/d/1adppJ66vonM27UYwC-KyldXl7oZ_5Pb0/edit?usp=sharing&ouid=116281580550740302191&rtpof=true&sd=true

To summarise the differences from Makruk:
1. The game ends in a draw immediately when the counting limit is reached,
   instead of exceeded. This effectively reduces the counting limit by
   one move.

2. The condition for a player to start board's honour counting is having
   three pieces or less, regardless of the number of unpromoted pawns on
   the board.

3. When the condition for piece's honour counting is met, the counting
   player may choose not to go into it, and continue the board's honour
   counting instead. This is be implemented by automatically choosing
   the method that can reach the counting limit in less number of moves.
src/parser.cpp
src/position.cpp
src/position.h
src/types.h
src/variant.cpp
src/variants.ini
test.py