diff -u bastet-0.41/bast.c bastet-0.41-cheat/bast.c --- bastet-0.41/bast.c 2004-10-15 23:58:52.000000000 +0200 +++ bastet-0.41-cheat/bast.c 2005-08-02 14:43:55.000000000 +0200 @@ -15,6 +15,7 @@ extern const DOT block_data[BLOCK_TYPES][BLOCK_ORIENTS][BLOCK_DOTS]; extern int bl_next; +extern int game_mode; extern unsigned char *well_data; extern WINDOW *well_win; @@ -171,6 +172,7 @@ int bl_sort[BLOCK_TYPES]; int i,rnd; const int bl_percent[BLOCK_TYPES]={75,92,98,100,100,100,100}; + int res; minimax(); @@ -182,14 +184,21 @@ qsort(bl_sort,BLOCK_TYPES,sizeof(int),&qsort_compar_func); //"next block" displayer - bl_next=bl_sort[BLOCK_TYPES-1]; + if (game_mode) + res=bl_sort[BLOCK_TYPES-1]; + else + bl_next = bl_sort[BLOCK_TYPES-1]; rnd=random()%100; //0..99 for(i=0;i<BLOCK_TYPES;i++) { - if(rnd<bl_percent[i]) - return bl_sort[i]; + if(rnd<bl_percent[i]) { + if (!game_mode) + return bl_sort[i]; + bl_next = bl_sort[i]; + return res; + } } - return bl_sort[0]; //should not arrive here + return res; //should not arrive here } Only in bastet-0.41-cheat: bast.d diff -u bastet-0.41/config.h bastet-0.41-cheat/config.h --- bastet-0.41/config.h 2004-10-15 23:58:52.000000000 +0200 +++ bastet-0.41-cheat/config.h 2005-09-30 15:29:10.000000000 +0200 @@ -13,6 +13,7 @@ #define CONTROL_DROP ' ' /* Drop (completely!) piece*/ #define CONTROL_QUIT 'q' /* Quits game*/ #define CONTROL_PAUSE 'p' /*pause*/ +#define CONTROL_MODE 'c' /* change game mode */ /* Highscore file. */ diff -u bastet-0.41/game.c bastet-0.41-cheat/game.c --- bastet-0.41/game.c 2004-10-15 23:58:52.000000000 +0200 +++ bastet-0.41-cheat/game.c 2005-09-30 15:37:01.000000000 +0200 @@ -71,6 +71,8 @@ /* Window in which the action takes place. */ WINDOW *well_win; +int game_mode = 0; + /* Convert (y, x)-coordinates in well to a pointer. */ unsigned char *yx2pointer(int y, int x) { @@ -354,6 +356,11 @@ update_well(0, WELL_HEIGHT); draw_block(well_win, y, x, type, orient, 0); break; + + case CONTROL_MODE: + game_mode = !game_mode; + break; + case CONTROL_DROP: draw_block(well_win,y,x,type,orient,1); while(check_block_pos(y+1,x,type,orient)) y++;