hex

hex.git
git clone git://git.lenczewski.org/hex.git
Log | Files | Refs

commit 45f69478fc27a7198e94cdb384891fd0f3d265f8
parent 138ad9e2b0c1f43550723f6f828ece8617493ab0
Author: MikoĊ‚aj Lenczewski <mblenczewski@gmail.com>
Date:   Mon, 21 Aug 2023 01:12:26 +0000

hex-server: Add assertion to catch invalid values in hexopponent

Diffstat:
Minclude/hex/proto.h | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/include/hex/proto.h b/include/hex/proto.h @@ -28,6 +28,7 @@ hexopponent(enum hex_player player) switch (player) { case HEX_PLAYER_BLACK: return HEX_PLAYER_WHITE; case HEX_PLAYER_WHITE: return HEX_PLAYER_BLACK; + default: assert(false); return HEX_PLAYER_BLACK; } }