]> git.cworth.org Git - dvonn/commit
Add a new dvonn_board_cell_owned_by function
authorCarl Worth <cworth@cworth.org>
Fri, 24 Apr 2020 21:27:24 +0000 (14:27 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 24 Apr 2020 21:27:24 +0000 (14:27 -0700)
commit7e10cab22cd0cd20ff48bf5665f0f7536f1ad032
treef526296157bae815b2703fc63c05dd9e5d2871ae
parent68e0718609201b5aee4d4371f7766da5a6c8808c
Add a new dvonn_board_cell_owned_by function

The compiler was warning that we were comparing enums of two different
types. That's true—we are, but that's because the values for
dvonn_cell_t are declared by reference to dvonn_player_t values.

Anyway, rather than cluttering up the code with lots of casts to
silence this warning, here we add a new function that takes care of
that cast, leading to more readable code.
dvonn-board.c
dvonn-board.h
dvonn.c