mirror of
https://github.com/abakh/nbsdgames.git
synced 2025-01-03 14:56:23 -05:00
Mac problem
This commit is contained in:
parent
5a51a8ba83
commit
040498a4f8
Binary file not shown.
@ -19,7 +19,7 @@ compile with -lncurses
|
||||
NOTE: This program is only made for entertainment porpuses. The puzzles are generated by randomly clearing tiles on the table and are guaranteed to have a solution , but are not guaranteed to have only one unique solution.
|
||||
*/
|
||||
typedef signed char byte;
|
||||
byte wait=0, waitcycles=0;
|
||||
byte _wait=0, waitcycles=0;//apparently 'wait' conflicts with a variable in a library macOS includes by default
|
||||
byte size,s;//s=size*size
|
||||
byte py,px;
|
||||
byte diff;
|
||||
@ -136,8 +136,8 @@ bool fill_with(char board[s][s],char fillwith){//returns 1 on failure
|
||||
void fill(char board[s][s]){
|
||||
for(byte num=1;num<=s;num++){//it fills random places in the board with 1s, then random places in the remaining space with 2s and so on...
|
||||
if(num==4){//something that randomly happens
|
||||
wait=(wait+1)%60;
|
||||
if(!wait && waitcycles<3)
|
||||
_wait=(_wait+1)%60;
|
||||
if(!_wait && waitcycles<3)
|
||||
waitcycles++;
|
||||
}
|
||||
if ( fill_with(board,int2sgn(num) ) ){
|
||||
@ -147,7 +147,7 @@ void fill(char board[s][s]){
|
||||
if(waitcycles==3)
|
||||
mvaddstr(2,0,"(You can set SUDOKU_FASTGEN if you just want to see if it works)");
|
||||
move(0,45);
|
||||
for(byte b=0;b<wait;b+=10)
|
||||
for(byte b=0;b<_wait;b+=10)
|
||||
addch('.');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user