src/main.c

changeset 51
84f2e380a434
parent 50
41017d0a72c5
child 52
26707039d5a6
     1.1 --- a/src/main.c	Mon Jun 16 13:45:31 2014 +0200
     1.2 +++ b/src/main.c	Mon Jun 16 15:41:06 2014 +0200
     1.3 @@ -116,12 +116,6 @@
     1.4              fprintf(stderr, "The options -c and -S are mutually exclusive\n");
     1.5              return 1;
     1.6          }
     1.7 -        // TODO: implement
     1.8 -        if (!settings->singlemachine) {
     1.9 -            fprintf(stderr, "Game continuation currently not supported for "
    1.10 -                "network games.\n");
    1.11 -            return 1;
    1.12 -        }
    1.13      }
    1.14      
    1.15      return 0;
    1.16 @@ -157,6 +151,24 @@
    1.17      refresh();
    1.18  }
    1.19  
    1.20 +void dump_moveinfo(GameState *gamestate) {
    1.21 +    int i = 1;
    1.22 +    for (MoveList *movelist = gamestate->movelist ;
    1.23 +        movelist ; movelist = movelist->next) {        
    1.24 +        if (++i % 2 == 0) {
    1.25 +            printw("%d. %s", i/2, movelist->move.string);
    1.26 +        } else {
    1.27 +            printw(" %s", movelist->move.string);
    1.28 +        }
    1.29 +        if (i % 20)  {
    1.30 +            addch(' ');
    1.31 +        } else {
    1.32 +            addch('\n');
    1.33 +        }
    1.34 +    }
    1.35 +    refresh();
    1.36 +}
    1.37 +
    1.38  void leavescr() {
    1.39      endwin();
    1.40  }

mercurial