mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
Introduce a new dsf_equivalent() function.
Not very interesting, but the idiom for checking equivalence via two calls to dsf_canonify is cumbersome enough to be worth abbreviating.
This commit is contained in:
@ -173,7 +173,7 @@ static bool isvalidmove(const game_state *state, bool clever,
|
||||
|
||||
/* can't create a new connection between cells in the same region
|
||||
* as that would create a loop. */
|
||||
if (dsf_canonify(state->dsf, from) == dsf_canonify(state->dsf, to))
|
||||
if (dsf_equivalent(state->dsf, from, to))
|
||||
return false;
|
||||
|
||||
/* if both cells are actual numbers, can't drag if we're not
|
||||
|
Reference in New Issue
Block a user