/*cancel the selected status*/
setfillpattern(pattern, LIGHTGRAY);
floodfill(temp->center-map[current->index].width/2+1, \
temp->my-map[current->index].thickness+1, YELLOW);
/*ajust the info of the list*/
current->index = map[current->index].next;
current->mx = current->center-map[current->index].width/2;
current->my = current->my+map[bakcurrent.index].thickness;
current->num--;
汉诺塔游戏:
/********************************************************************
* The C source file is about playing Hanoi game.
*********************************************************************/
/********************************************************************
* STEPS:
*
* 1. data initializtion.
* 2. get key event.
* 3. operate according to the key pressed.
* 4. check the result of each operation to see whether succeed. if su-
* cceed, terminate.
*
* REQUESTS:
*
* 1. give the total num of steps.
* 2. give the time used.
*********************************************************************/