Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

SingleBestGuess (lines 2715-2729)

2715  !  SingleBestGuess returns the highest-scoring object in the match list
2716  !  if it is the clear winner, or returns -1 if there is no clear winner
2717  ! ----------------------------------------------------------------------------
2718   
2719  [ SingleBestGuess  earliest its_score best i;
2720   
2721    earliest=-1; best=-1000;
2722    for (i=0:i<number_matched:i++)
2723    {   its_score=match_scores-->i;
2724        if (its_score==best) { earliest = -1; }
2725        if (its_score>best) { best=its_score; earliest=match_list-->i; }
2726    }
2727    bestguess_score = best;
2728    return earliest;
2729  ];


Last updated 27 February 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.