From: Dirk B. <db...@us...> - 2005-10-08 08:24:30
|
Update of /cvsroot/win32forth/win32forth/apps/Sudoku In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29063/apps/Sudoku Modified Files: Sudoku.f SudokuStatusBar.f Log Message: Some changes to add Sudoku into the next relase Index: SudokuStatusBar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Sudoku/SudokuStatusBar.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SudokuStatusBar.f 3 Oct 2005 22:04:27 -0000 1.1 --- SudokuStatusBar.f 8 Oct 2005 08:24:21 -0000 1.2 *************** *** 4,49 **** \- hStatusBar 0 value hStatusBar ! Warning off ! Needs StatusBarClass.f ! Warning on cr .( Loading Sudoku StatusBar...) - - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ \\\\\ Sudoku StatusBar \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - - :Object SudokuStatusBar <Super StatusBar - - :M Start: ( parent -- ) - Start: super - 200 -1 2 SetParts: self - ;M - - :M WindowStyle: - [ WS_CHILD WS_CLIPSIBLINGS or ] literal \ not WS_VISIBLE - start hidden, no border - ;M - - ;Object - - - 0 value StatusBarHeight - - : ShowStatusBar ( -- ) GetWindowRect: SudokuStatusBar nip swap - nip to StatusBarHeight - SW_SHOW show: SudokuStatusBar true check: hStatusBar ; - : HideStatusBar ( -- ) 0 to StatusBarHeight - SW_HIDE show: SudokuStatusBar false check: hStatusBar ; - - - \s - \ ******** Using ExControls.f ******** - \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\ Sudoku StatusBar \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - Needs ExControls.f - :Object SudokuStatusBar <Super MultiStatusBar --- 4,15 ---- \- hStatusBar 0 value hStatusBar ! Needs ExControls.f cr .( Loading Sudoku StatusBar...) \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\ Sudoku StatusBar \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ :Object SudokuStatusBar <Super MultiStatusBar *************** *** 61,69 **** create text$ 256 allot :M GetText: ( n -- szText ) \ get text in n'th part ! text$ swap SB_GETTEXT SendMessage:Self drop text$ ;M ! :M UpdatePart: ( text$ p -- ) >r ! dup count r@ GetText: self zcount compare IF count asciiz r> SetText: self --- 27,35 ---- create text$ 256 allot :M GetText: ( n -- szText ) \ get text in n'th part ! text$ swap SB_GETTEXT SendMessage:Self drop text$ ;M ! :M UpdatePart: ( text$ p -- ) >r ! dup count r@ GetText: self zcount compare IF count asciiz r> SetText: self Index: Sudoku.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Sudoku/Sudoku.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Sudoku.f 3 Oct 2005 22:04:27 -0000 1.1 --- Sudoku.f 8 Oct 2005 08:24:21 -0000 1.2 *************** *** 43,47 **** 0 value ShowElimination 0 value EditMode ! : PlayError ( -- ) AudibleWarning IF MB_ICONEXCLAMATION call MessageBeep drop THEN ; : PlayApplause ( -- ) ShowSolution ?exit --- 43,47 ---- 0 value ShowElimination 0 value EditMode ! : PlayError ( -- ) AudibleWarning IF MB_ICONEXCLAMATION call MessageBeep drop THEN ; : PlayApplause ( -- ) ShowSolution ?exit *************** *** 114,124 **** \ SetColours Create TempNumbers 81 allot ! : Start>Solution numbers 81 + numbers 81 move ; ! : Current>Solution numbers 162 + numbers 81 move ; ! : Solution>Current numbers numbers 162 + 81 move ; ! : Current>Temp numbers 162 + TempNumbers 81 move ; ! : Temp>Current TempNumbers numbers 162 + 81 move ; ! : Solution>Temp numbers TempNumbers 81 move ; ! : Temp>Solution TempNumbers numbers 81 move ; Create Eliminations 9 81 * allot : ns cr Numbers 81 type ; --- 114,124 ---- \ SetColours Create TempNumbers 81 allot ! : Start>Solution numbers 81 + numbers 81 move ; ! : Current>Solution numbers 162 + numbers 81 move ; ! : Solution>Current numbers numbers 162 + 81 move ; ! : Current>Temp numbers 162 + TempNumbers 81 move ; ! : Temp>Current TempNumbers numbers 162 + 81 move ; ! : Solution>Temp numbers TempNumbers 81 move ; ! : Temp>Solution TempNumbers numbers 81 move ; Create Eliminations 9 81 * allot : ns cr Numbers 81 type ; *************** *** 131,145 **** : GetLastMove ( -- n ) LastMove w@ 256 /mod 9 /mod to y to x ; : SetLastMove ( x y n -- ) -rot 9 * + 256 * + LastMove w! ; ! : NumberFixed ( -- n ) 0 81 0 DO Numbers 81 + i + c@ 49 58 within IF 1+ THEN LOOP ; : ShowMoves ( -- ) EditMode moves c@ 0= or IF s" Given numbers: " pad place NumberFixed ! ELSE s" Moves: " pad place Moves c@ THEN (.) pad +place pad 1 UpdatePart: SudokuStatusBar ; : StoreMove ( x y n -- ) Moves cincr SetLastMove ShowMoves ; : NoRedo ( -- ) 0 Moves 1+ c! ; : ZeroMoves ( -- ) 0 Moves w! ShowMoves ; ! : Solved? ( -- ) numbers 162 + 81 48 scan nip 0= \ no blanks? ! IF IDM_CHECK_ALL DoCommand error 0= ShowSolution 0= and IF IDM_STOP DoCommand THEN THEN ; : CellAddress ( x y -- a ) 9 * + Numbers + ; : GetNumber ( x y - n ) CellAddress 162 + c@ ; --- 131,145 ---- : GetLastMove ( -- n ) LastMove w@ 256 /mod 9 /mod to y to x ; : SetLastMove ( x y n -- ) -rot 9 * + 256 * + LastMove w! ; ! : NumberFixed ( -- n ) 0 81 0 DO Numbers 81 + i + c@ 49 58 within IF 1+ THEN LOOP ; : ShowMoves ( -- ) EditMode moves c@ 0= or IF s" Given numbers: " pad place NumberFixed ! ELSE s" Moves: " pad place Moves c@ THEN (.) pad +place pad 1 UpdatePart: SudokuStatusBar ; : StoreMove ( x y n -- ) Moves cincr SetLastMove ShowMoves ; : NoRedo ( -- ) 0 Moves 1+ c! ; : ZeroMoves ( -- ) 0 Moves w! ShowMoves ; ! : Solved? ( -- ) numbers 162 + 81 48 scan nip 0= \ no blanks? ! IF IDM_CHECK_ALL DoCommand error 0= ShowSolution 0= and IF IDM_STOP DoCommand THEN THEN ; : CellAddress ( x y -- a ) 9 * + Numbers + ; : GetNumber ( x y - n ) CellAddress 162 + c@ ; *************** *** 152,159 **** : SetColour ( x y c -- ) -rot CellAddress 243 + c! ; : WarningText ( x y ) true to error VisibleWarning ! IF 2dup GetColour 128 or SetColour c" Error in position" 1 UpdatePart: SudokuStatusBar ELSE 2drop ! THEN ; \ warning colour ! : RemoveWarningText ( x y ) 2dup GetColour 127 and SetColour ; \ normal text colour : RemoveWarnings ( -- ) 9 0 DO 9 0 DO i j RemoveWarningText LOOP LOOP ; --- 152,159 ---- : SetColour ( x y c -- ) -rot CellAddress 243 + c! ; : WarningText ( x y ) true to error VisibleWarning ! IF 2dup GetColour 128 or SetColour c" Error in position" 1 UpdatePart: SudokuStatusBar ELSE 2drop ! THEN ; \ warning colour ! : RemoveWarningText ( x y ) 2dup GetColour 127 and SetColour ; \ normal text colour : RemoveWarnings ( -- ) 9 0 DO 9 0 DO i j RemoveWarningText LOOP LOOP ; *************** *** 222,226 **** LOOP ; ! : Eliminated? ( n p - f ) swap 49 - 81 * + Eliminations + c@ ; : RemoveEliminations ( -- ) 9 0 DO 9 0 DO i j 2dup GetColour 64 invert and SetColour LOOP LOOP ; --- 222,226 ---- LOOP ; ! : Eliminated? ( n p - f ) swap 49 - 81 * + Eliminations + c@ ; : RemoveEliminations ( -- ) 9 0 DO 9 0 DO i j 2dup GetColour 64 invert and SetColour LOOP LOOP ; *************** *** 229,233 **** SetEliminations CurrentCursor ! IF 9 0 DO 9 0 DO CurrentCursor 48 + i j 9 * + Eliminated? i j GetNumber 48 = and --- 229,233 ---- SetEliminations CurrentCursor ! IF 9 0 DO 9 0 DO CurrentCursor 48 + i j 9 * + Eliminated? i j GetNumber 48 = and *************** *** 245,249 **** : Try ( n p -- f ) ! 2dup Eliminated? IF 2drop false exit THEN >r 0 \ position saved on return stack, number and flag kept on stack r@ 9 / 9 * numbers + 9 3 pick scan nip or dup IF r> 3drop false exit THEN \ check row, exit on error --- 245,249 ---- : Try ( n p -- f ) ! 2dup Eliminated? IF 2drop false exit THEN >r 0 \ position saved on return stack, number and flag kept on stack r@ 9 / 9 * numbers + 9 3 pick scan nip or dup IF r> 3drop false exit THEN \ check row, exit on error *************** *** 257,270 **** numbers 81 48 scan nip \ any more spaces? IF ! 81 0 DO \ check all 81 numbers for '0' ! i numbers + c@ 48 = ! IF \ space found ! 58 49 DO ! i j try \ try fitting numbers in... IF ! i j numbers + c! \ set number recurse IF ! FindNumber counter MaxToFind < and IF 1 +to counter 48 j numbers + c! \ ns ELSE unloop unloop true exit --- 257,270 ---- numbers 81 48 scan nip \ any more spaces? IF ! 81 0 DO \ check all 81 numbers for '0' ! i numbers + c@ 48 = ! IF \ space found ! 58 49 DO ! i j try \ try fitting numbers in... IF ! i j numbers + c! \ set number recurse IF ! FindNumber counter MaxToFind < and IF 1 +to counter 48 j numbers + c! \ ns ELSE unloop unloop true exit *************** *** 272,281 **** ELSE 48 j numbers + c! \ remove number THEN ! THEN ! LOOP ! false leave \ none of 1-9 fit, false trail.... ! THEN ! LOOP ! ELSE true \ no more spaces THEN ; --- 272,281 ---- ELSE 48 j numbers + c! \ remove number THEN ! THEN ! LOOP ! false leave \ none of 1-9 fit, false trail.... ! THEN ! LOOP ! ELSE true \ no more spaces THEN ; *************** *** 294,298 **** : ShowTime ( a n -- ) pad place ! time 1000 / 0 \ 60 /mod <# # 6 base ! # 10 base ! ':' hold #s #> pad +place s" m:s" pad +place --- 294,298 ---- : ShowTime ( a n -- ) pad place ! time 1000 / 0 \ 60 /mod <# # 6 base ! # 10 base ! ':' hold #s #> pad +place s" m:s" pad +place *************** *** 350,354 **** \ IF 3drop false to SaveFlag ( WriteErrorMessage ) \ file does not exist IF drop WriteErrorMessage false to SaveFlag \ file does not exist ! ELSE to FileHandle count CurrentFile place CurrentFile count "path-only" Directory place --- 350,354 ---- \ IF 3drop false to SaveFlag ( WriteErrorMessage ) \ file does not exist IF drop WriteErrorMessage false to SaveFlag \ file does not exist ! ELSE to FileHandle count CurrentFile place CurrentFile count "path-only" Directory place *************** *** 365,369 **** IF "to-pathend" ELSE drop s" Untitled" ! THEN pad +place s" ?" pad +place pad +NULL pad 1+ z" Sudoku" --- 365,369 ---- IF "to-pathend" ELSE drop s" Untitled" ! THEN pad +place s" ?" pad +place pad +NULL pad 1+ z" Sudoku" *************** *** 404,408 **** RecentFilesList s" File1" 10 1 DO ! 2dup + 1- i 48 + swap c! 2dup i GetRecentFile: RecentFiles count 2swap REG_SZ SetRegistryValue --- 404,408 ---- RecentFilesList s" File1" 10 1 DO ! 2dup + 1- i 48 + swap c! 2dup i GetRecentFile: RecentFiles count 2swap REG_SZ SetRegistryValue *************** *** 429,441 **** :Object Frame <Super Window ! Record: CHOOSEFONT ! int lSize ! int hOwner ! int hDC ! int lpLogFont ! int iPointSize ! int FontFlags int rgbColors ! 8 cells class-allot ;RecordSize: sizeof(CHOOSEFONT) --- 429,441 ---- :Object Frame <Super Window ! Record: CHOOSEFONT ! int lSize ! int hOwner ! int hDC ! int lpLogFont ! int iPointSize ! int FontFlags int rgbColors ! 8 cells class-allot ;RecordSize: sizeof(CHOOSEFONT) *************** *** 447,451 **** 64 bytes CustomColors ! Record: CHOOSECOLOR int lStructSize int hwndOwner --- 447,451 ---- 64 bytes CustomColors ! Record: CHOOSECOLOR int lStructSize int hwndOwner *************** *** 486,490 **** CC_RGBINIT CC_FULLOPEN or to Flags ;M ! :M WindowHasMenu: ( -- f ) true ;M --- 486,490 ---- CC_RGBINIT CC_FULLOPEN or to Flags ;M ! :M WindowHasMenu: ( -- f ) true ;M *************** *** 503,507 **** register-frame-window drop create-frame-window to hWnd ! WindowState SIZE_MAXIMIZED = IF SW_SHOWMAXIMIZED ELSE SW_SHOW THEN Show: self \ allow to start maximized when WindowState is SIZE_MAXIMIZED Update: self --- 503,507 ---- register-frame-window drop create-frame-window to hWnd ! WindowState SIZE_MAXIMIZED = IF SW_SHOWMAXIMIZED ELSE SW_SHOW THEN Show: self \ allow to start maximized when WindowState is SIZE_MAXIMIZED Update: self *************** *** 573,577 **** Options SaveSettings Sudoku SaveSettings ! SaveRecentFiles ZeroMenu: CurrentMenu SudokuAccelerators DisableAccelerators \ free the accelerator table --- 573,577 ---- Options SaveSettings Sudoku SaveSettings ! SaveRecentFiles ZeroMenu: CurrentMenu SudokuAccelerators DisableAccelerators \ free the accelerator table *************** *** 633,637 **** size x * 1 + 1+ LeftMargin + size y * 1 + 1+ TopMargin + ! 2dup size 1 - size 1 - d+ Color FillArea: mdc ;M --- 633,637 ---- size x * 1 + 1+ LeftMargin + size y * 1 + 1+ TopMargin + ! 2dup size 1 - size 1 - d+ Color FillArea: mdc ;M *************** *** 639,643 **** :M PlaceText: ( -- ) 9 0 DO ! 9 0 DO i j GetColour dup dup 63 and --- 639,643 ---- :M PlaceText: ( -- ) 9 0 DO ! 9 0 DO i j GetColour dup dup 63 and *************** *** 652,658 **** Case 0 of FixedColor Endof ! 1 of TextColor1 EndOf ! 2 of TextColor2 EndOf ! 4 of TextColor3 EndOf 8 of TextColor4 EndOf ( default ) TextColor1 swap --- 652,658 ---- Case 0 of FixedColor Endof ! 1 of TextColor1 EndOf ! 2 of TextColor2 EndOf ! 4 of TextColor3 EndOf 8 of TextColor4 EndOf ( default ) TextColor1 swap *************** *** 660,664 **** THEN SetTextColor: mdc ! size i * 1 + LeftMargin + size j * 1 + TopMargin + 2dup size 1+ size 1+ D+ SetRect: TempRect --- 660,664 ---- THEN SetTextColor: mdc ! size i * 1 + LeftMargin + size j * 1 + TopMargin + 2dup size 1+ size 1+ D+ SetRect: TempRect *************** *** 680,684 **** :M On_Paint: ( -- ) \ SaveDC: dc ! SRCCOPY 0 0 GetHandle: mdc Width Height StatusBarHeight - ToolbarHeight - 0 ToolbarHeight BitBlt: dc --- 680,684 ---- :M On_Paint: ( -- ) \ SaveDC: dc ! SRCCOPY 0 0 GetHandle: mdc Width Height StatusBarHeight - ToolbarHeight - 0 ToolbarHeight BitBlt: dc *************** *** 690,697 **** :M WM_CLOSE ( h m w l -- res ) SaveIfModified ! IF CurrentFile Insert: RecentFiles WM_CLOSE WM: Super \ close window ! ELSE 0 \ abandon the close THEN ;M --- 690,697 ---- :M WM_CLOSE ( h m w l -- res ) SaveIfModified ! IF CurrentFile Insert: RecentFiles WM_CLOSE WM: Super \ close window ! ELSE 0 \ abandon the close THEN ;M *************** *** 706,710 **** CurrentCursor 142 + AppInst call LoadCursor dup ShowNumber and IF call SetCursor drop true ELSE drop false THEN ; ! :M SelectCursor: ( n -- ) to CurrentCursor --- 706,710 ---- CurrentCursor 142 + AppInst call LoadCursor dup ShowNumber and IF call SetCursor drop true ELSE drop false THEN ; ! :M SelectCursor: ( n -- ) to CurrentCursor *************** *** 718,722 **** IF CurrentCursor 9 + 10 mod dup CheckNumber SelectCursor: self THEN ; ! :M WM_MOUSEWHEEL ( h m w l -- res ) over word-split 32768 and \ get the Key flags (loword of wParam) and the WHEEL_DELTA (hiword of wParam) \ A positive value indicates that the wheel was rotated forward, away --- 718,722 ---- IF CurrentCursor 9 + 10 mod dup CheckNumber SelectCursor: self THEN ; ! :M WM_MOUSEWHEEL ( h m w l -- res ) over word-split 32768 and \ get the Key flags (loword of wParam) and the WHEEL_DELTA (hiword of wParam) \ A positive value indicates that the wheel was rotated forward, away *************** *** 822,826 **** 0 ;M ! :M WM_SYSCOMMAND ( h m w l -- res ) \ determine whether Frame is being Maximized or Restored over 0xFFF0 and dup SC_MAXIMIZE = to Maximizing --- 822,826 ---- 0 ;M ! :M WM_SYSCOMMAND ( h m w l -- res ) \ determine whether Frame is being Maximized or Restored over 0xFFF0 and dup SC_MAXIMIZE = to Maximizing *************** *** 854,858 **** IDYES = IF IDM_RESTART DoCommand ELSE InitGame THEN THEN ; ! : New ( -- ) SaveIfModified 0= ?exit 0 to x 0 to y BlankAll Redraw: Frame CurrentFile Insert: RecentFiles --- 854,858 ---- IDYES = IF IDM_RESTART DoCommand ELSE InitGame THEN THEN ; ! : New ( -- ) SaveIfModified 0= ?exit 0 to x 0 to y BlankAll Redraw: Frame CurrentFile Insert: RecentFiles *************** *** 867,871 **** CurrentFile count OpenDialog place Frame @ Start: OpenDialog dup c@ ?OpenFile ; IDM_OPEN SetCommand ! : SaveAs ( -- ) CurrentFile count 2dup SaveDialog place PreviousFile place Frame @ Start: SaveDialog dup c@ --- 867,871 ---- CurrentFile count OpenDialog place Frame @ Start: OpenDialog dup c@ ?OpenFile ; IDM_OPEN SetCommand ! : SaveAs ( -- ) CurrentFile count 2dup SaveDialog place PreviousFile place Frame @ Start: SaveDialog dup c@ *************** *** 873,877 **** ELSE drop false to SaveFlag THEN ; IDM_SAVE_AS SetCommand ! : Save ( -- ) CurrentFile c@ IF CurrentFile SaveFile ELSE SaveAs THEN ; IDM_SAVE SetCommand : ImportGame ( -- ) SaveIfModified 0= ?exit --- 873,877 ---- ELSE drop false to SaveFlag THEN ; IDM_SAVE_AS SetCommand ! : Save ( -- ) CurrentFile c@ IF CurrentFile SaveFile ELSE SaveAs THEN ; IDM_SAVE SetCommand : ImportGame ( -- ) SaveIfModified 0= ?exit *************** *** 931,937 **** : ToggleEdit ( -- ) EditMode IF FinishEdit ELSE StartEdit THEN ; IDM_TOGGLE_EDIT SetCommand : UndoMove ( -- ) ! Moves c@ IF ! GetLastMove Moves cdecr PutNumber check redraw: frame --- 931,937 ---- : ToggleEdit ( -- ) EditMode IF FinishEdit ELSE StartEdit THEN ; IDM_TOGGLE_EDIT SetCommand : UndoMove ( -- ) ! Moves c@ IF ! GetLastMove Moves cdecr PutNumber check redraw: frame *************** *** 944,948 **** IF Moves cincr ! GetLastMove Moves cdecr PutNumber check redraw: frame --- 944,948 ---- IF Moves cincr ! GetLastMove Moves cdecr PutNumber check redraw: frame *************** *** 962,970 **** true to RemoveWarning to AudibleWarning to VisibleWarning ! error IF c" Error in current position" 1 UpdatePart: SudokuStatusBar false THEN ; IDM_CHECK_ALL SetCommand : SolveCurrentPosition ( -- f ) \ true on success CheckAll error 0= ! IF Current>solution SetEliminations --- 962,970 ---- true to RemoveWarning to AudibleWarning to VisibleWarning ! error IF c" Error in current position" 1 UpdatePart: SudokuStatusBar false THEN ; IDM_CHECK_ALL SetCommand : SolveCurrentPosition ( -- f ) \ true on success CheckAll error 0= ! IF Current>solution SetEliminations *************** *** 975,979 **** THEN THEN ; ! : Hint ( -- ) SolutionNeeded? IF SolveCurrentPosition ELSE true THEN IF x y CellAddress c@ PutNumber NextSpace Redraw: Frame THEN ; IDM_HINT SetCommand : SeeSolution ( -- ) \ toggle --- 975,979 ---- THEN THEN ; ! : Hint ( -- ) SolutionNeeded? IF SolveCurrentPosition ELSE true THEN IF x y CellAddress c@ PutNumber NextSpace Redraw: Frame THEN ; IDM_HINT SetCommand : SeeSolution ( -- ) \ toggle *************** *** 1013,1018 **** : ShowEliminations ( -- ) \ toggle ShowElimination ! IF RemoveEliminations false false ! ELSE eliminate true true THEN to ShowElimination Check: hEliminate redraw: frame ; IDM_ELIMINATION SetCommand --- 1013,1018 ---- : ShowEliminations ( -- ) \ toggle ShowElimination ! IF RemoveEliminations false false ! ELSE eliminate true true THEN to ShowElimination Check: hEliminate redraw: frame ; IDM_ELIMINATION SetCommand *************** *** 1033,1041 **** \ Miscellaneous : Left ( -- ) BlankWrongNumber ! DecreaseX RemoveWarnings check Redraw: Frame ; IDM_LEFT SetCommand : Right ( -- ) BlankWrongNumber ! IncreaseX RemoveWarnings check Redraw: Frame ; IDM_RIGHT SetCommand : Up ( -- ) BlankWrongNumber ! DecreaseY RemoveWarnings check Redraw: Frame ; IDM_UP SetCommand : Down ( -- ) BlankWrongNumber IncreaseY RemoveWarnings check Redraw: Frame ; IDM_DOWN SetCommand --- 1033,1041 ---- \ Miscellaneous : Left ( -- ) BlankWrongNumber ! DecreaseX RemoveWarnings check Redraw: Frame ; IDM_LEFT SetCommand : Right ( -- ) BlankWrongNumber ! IncreaseX RemoveWarnings check Redraw: Frame ; IDM_RIGHT SetCommand : Up ( -- ) BlankWrongNumber ! DecreaseY RemoveWarnings check Redraw: Frame ; IDM_UP SetCommand : Down ( -- ) BlankWrongNumber IncreaseY RemoveWarnings check Redraw: Frame ; IDM_DOWN SetCommand *************** *** 1051,1055 **** : Select9 ( -- ) 9 select ; IDM_SELECT_9 SetCommand : SelectBlank ( -- ) 0 select ; IDM_SELECT_BLANK SetCommand ! : KeyDown ( n -- ) dup select 48 + PutNumber check Redraw: Frame Solved? NoRedo ; : Key1 ( -- ) 1 KeyDown ; IDM_KEY_1 SetCommand : Key2 ( -- ) 2 KeyDown ; IDM_KEY_2 SetCommand --- 1051,1055 ---- : Select9 ( -- ) 9 select ; IDM_SELECT_9 SetCommand : SelectBlank ( -- ) 0 select ; IDM_SELECT_BLANK SetCommand ! : KeyDown ( n -- ) dup select 48 + PutNumber check Redraw: Frame Solved? NoRedo ; : Key1 ( -- ) 1 KeyDown ; IDM_KEY_1 SetCommand : Key2 ( -- ) 2 KeyDown ; IDM_KEY_2 SetCommand *************** *** 1149,1153 **** FCONTROL 'I' IDM_IMPORT AccelEntry ! \ View menu FCONTROL '1' IDM_SIZE_1 AccelEntry FCONTROL '2' IDM_SIZE_2 AccelEntry --- 1149,1153 ---- FCONTROL 'I' IDM_IMPORT AccelEntry ! \ View menu FCONTROL '1' IDM_SIZE_1 AccelEntry FCONTROL '2' IDM_SIZE_2 AccelEntry *************** *** 1203,1207 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Opening files from the command line \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --- 1203,1207 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! \ Opening files from the command line \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ *************** *** 1280,1304 **** ; - (( - : da SudokuAccelerators DisableAccelerators ; - - \ Su - \ \s - cr .( Save Sudoku.exe [Y/N]: ) key dup emit dup 121 = swap 89 = or nostack - [IF] - )) - [defined] VIMAGE [if] also VIMAGE [then] [defined] CONSOLE-DLL? [if] false to CONSOLE-DLL? [then] ! ' Su turnkey Sudoku.exe needs SudokuResources ! cr .( Do you want to associate .sku files with Sudoku.exe [Y/N]: ) key dup emit dup 121 = swap 89 = or nostack ! [IF] ! Needs FileAssociations ! s" .sku" s" Sudoku File" s" Sudoku.exe" SetAssociation ! [THEN] ! 2 pause-seconds bye ! (( ! [ELSE] Su ! [THEN] ! )) \ No newline at end of file --- 1280,1292 ---- ; [defined] VIMAGE [if] also VIMAGE [then] [defined] CONSOLE-DLL? [if] false to CONSOLE-DLL? [then] ! ' Su turnkey Sudoku.exe needs SudokuResources ! \ cr .( Do you want to associate .sku files with Sudoku.exe [Y/N]: ) key dup emit dup 121 = swap 89 = or nostack ! \ [IF] ! \ Needs FileAssociations ! \ s" .sku" s" Sudoku File" s" Sudoku.exe" SetAssociation ! \ [THEN] ! 1 pause-seconds bye ! |