Fusion de main (analyse du match, 1l) ; l'abandon passe en version 4 des événements
La version 3 est celle de main (identifiant de match) ; l'abandon prend la version 4, avec la migration des versions 1, 2 et 3 testée. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -914,6 +914,32 @@ engine_resignation_of(const char *position_id, const char *match_id,
|
||||
return ENGINE_OK;
|
||||
}
|
||||
|
||||
/* --------------------------------------- Chances de gagner le match */
|
||||
|
||||
engine_status
|
||||
engine_match_chances_of(const char *match_id, float equity, engine_match_chances *chances)
|
||||
{
|
||||
engine_match m;
|
||||
cubeinfo cube;
|
||||
engine_status status;
|
||||
|
||||
if (engine_state != READY)
|
||||
return ENGINE_ERROR_NOT_INITIALISED;
|
||||
status = engine_decode_match(match_id, &m);
|
||||
if (status != ENGINE_OK)
|
||||
return status;
|
||||
if (m.match_length == 0
|
||||
|| SetCubeInfo(&cube, m.cube_value, m.cube_owner, m.player_on_roll, m.match_length,
|
||||
m.score, m.crawford, m.jacoby, DEFAULT_BEAVERS, VARIATION_STANDARD) != 0)
|
||||
return ENGINE_ERROR_MATCH_ID;
|
||||
chances->at_score = getMEAtScore(m.score[0], m.score[1], m.match_length, m.player_on_roll,
|
||||
m.crawford, aafMET, aafMETPostCrawford);
|
||||
chances->mwc = eq2mwc(equity, &cube);
|
||||
/* analysis.c, updateStatcontext : « eq2mwc(rSkill, &ci) - eq2mwc(0.0f, &ci) ». */
|
||||
chances->loss = eq2mwc(equity, &cube) - eq2mwc(0.0f, &cube);
|
||||
return ENGINE_OK;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- Analyse d'une décision de videau */
|
||||
|
||||
/* Le plus petit de deux nombres. */
|
||||
|
||||
Reference in New Issue
Block a user