~ubuntu-branches/ubuntu/saucy/sgt-puzzles/saucy

« back to all changes in this revision

Viewing changes to inertia.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2006-03-22 23:53:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060322235309-t8n4d27qhnuwuqf8
Tags: 6616-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
735
735
    char *err, *soln, *p;
736
736
 
737
737
    /*
 
738
     * Before anything else, deal with the special case in which
 
739
     * all the gems are already collected.
 
740
     */
 
741
    for (i = 0; i < wh; i++)
 
742
        if (currstate->grid[i] == GEM)
 
743
            break;
 
744
    if (i == wh) {
 
745
        *error = "Game is already solved";
 
746
        return NULL;
 
747
    }
 
748
 
 
749
    /*
738
750
     * Solving Inertia is a question of first building up the graph
739
751
     * of where you can get to from where, and secondly finding a
740
752
     * tour of the graph which takes in every gem.