Ejemplo n.º 1
0
static int
DumpOver(const TanBoard anBoard, char *pchOutput, const bgvariation bgv)
{

    float ar[NUM_OUTPUTS] = { 0, 0, 0, 0, 0 };  /* NUM_OUTPUTS is 5 */

    if (EvalOver(anBoard, ar, bgv, NULL))
        return -1;

    if (ar[OUTPUT_WIN] > 0.0)
        strcpy(pchOutput, _("Win"));
    else
        strcpy(pchOutput, _("Loss"));
    strcat(pchOutput, " ");

    if (ar[OUTPUT_WINBACKGAMMON] > 0.0 || ar[OUTPUT_LOSEBACKGAMMON] > 0.0)
        sprintf(pchOutput, "(%s)\n", _("backgammon"));
    else if (ar[OUTPUT_WINGAMMON] > 0.0 || ar[OUTPUT_LOSEGAMMON] > 0.0)
        sprintf(pchOutput, "(%s)\n", _("gammon"));
    else
        sprintf(pchOutput, "(%s)\n", _("single"));

    return 0;

}
Ejemplo n.º 2
0
static void
HyperOver ( const TanBoard anBoard, float ar[ NUM_OUTPUTS ], const int nC ) {

  EvalOver( anBoard, ar, VARIATION_HYPERGAMMON_1 + nC - 1, NULL );

}