static ratectx *rate_new(const mm *m, const dig *s)
{
ratectx *r = rate_alloc(m);
+
rate_init(r, s);
return (r);
}
*w = ww;
}
-static void rate_free(ratectx *r)
-{
- xfree(r->v);
- DESTROY(r);
-}
+static void rate_free(ratectx *r) { xfree(r->v); DESTROY(r); }
/*----- Computer player ---------------------------------------------------*/
unsigned x))
{
unsigned k = c->m.k, n = c->m.n;
+
dofep(c, fn, k, n, 0, c->x);
}
}
static void cp_rate(void *r, const dig *g, unsigned *b, unsigned *w)
-{
- rate(r, g, b, w);
-}
+ { rate(r, g, b, w); }
static const dig *cp_guess(void *cc)
{
}
static void sp_update(void *ss, const dig *g, unsigned b, unsigned w)
-{
- spc *s = ss;
- cp_update(s->c, g, b, w);
-}
+ { spc *s = ss; cp_update(s->c, g, b, w); }
/*----- Main game logic ---------------------------------------------------*/