TI 83/84
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWARETI 83/84

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #16  
Old May 18th, 2009, 06:33 AM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
Yes change the T to an L in:

Repeat T=18 or 81=sum(L1

o I was bored and i figured this out...
ipart(10fpart(N10^(D-1
Where N is the number and D is the decimal place you want

so put in 5.0023 as N and 3 as D and it pulls out the .002, but as a whole number
hope that helps


Why are YOU finding all the bugs in MY program? lol

Reply With Quote
  Trader Rating: 0 · #17  
Old May 18th, 2009, 10:41 AM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
Yes change the T to an L in:

Repeat T=18 or 81=sum(L1

o I was bored and i figured this out...
ipart(10fpart(N10^(D-1
Where N is the number and D is the decimal place you want

so put in 5.0023 as N and 3 as D and it pulls out the .002, but as a whole number
hope that helps


Why are YOU finding all the bugs in MY program? lol

Lol, I guess I'm better at debugging than I thought!

Anyways, I was using a similar method:
Code:
0->W
For(V,1,9
getKey->G
If G*doesn't equal*0:10->V
If V*doesn't equal*10:Then
[A](X,10,-Z->P
10fPart((10^V(P-iPart(P))-fPart(10^V(P-iPart(P))))/10)=V:Then
Text(13,50+5W,V
W+1->W
End:End:End
If W=0:Then
Text(13,50,"No Notes
Text(19,50,"Added Yet
End

This is (in my eyes at least) a fairly complex code. It checks the current position of the cursor, cooresponds it to it's matching number in the matrix, and finds out if it has any decimals that equal it's decimal place. This also will move where the number is displayed not based on the number it is, but how many noted numbers you have entered.

In other news, I have finished my code for entering numbers in both modes, and am finished with the delete button. This will delete the number you have entered if in INSERT mode, and will delete all the notes if in NOTES mode. Also, I made it so if you're in the notes mode, and you want to get rid of a single number instead of all of the numbers, you can just hit that number again, and it will change that digit's value to zero, and redisplay the notes. The entire program is almost done, I just need to reinsert the code that will quit the program once you have won, a menu, and all the levels. I'm thinking about making it 3 seperate programs. One will be the menu, one my sudoku game, and one your sudoku solver.

Reply With Quote
  Trader Rating: 0 · #18  
Old May 18th, 2009, 12:52 PM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
yea there is definitaly a typo somewhere because my calculator solved your sudoku, ill look over the code to see if anythings missing

Reply With Quote
  Trader Rating: 0 · #19  
Old May 18th, 2009, 03:49 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
yea there is definitaly a typo somewhere because my calculator solved your sudoku, ill look over the code to see if anythings missing

You can't post your code directly from the program editor in TI Connect? Or do you not have a cable?

Reply With Quote
  Trader Rating: 0 · #20  
Old May 18th, 2009, 05:14 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
I've almost finished the menu. All I have to do is upload the puzzles to it, and finish a feature I made for it that will let you choose which puzzle you want to do (I'm thinking of uploading 15 to 30 puzzles). Anyways, it looks pretty nice, says it was made by the both of us (if you want I can put a different name in it for you), and works very quickly. The prerequisites are that the menu is named SUDOKU, your solver is named SUDOKU1, and my game is named SUDOKU2. I was also thinking of putting in a warning screen saying that it will delete both matrix A and matrix B if doing your program. Any who, here's the program:
Code:
:ClrDraw
:14->X
:Text(2,4,"SUDOKU PACKET
:For(A,0,55
:Pxl-On(1,A
:Pxl-On(9,A
:End
:Text(11,3,"PLAY
:Text(19,3,"SOLVER
:Text(27,3,"QUIT
:Text(43,0,"MADE BY:
:Text(49,0,"CALCFEAK AND
:Text(55,0,"MUFINMCFLUFIN
:Pxl-On(14,1
:1->Y
:While 1
:getKey->G
:While not(G
:getKey->G
:End
:Pxl-Off(X,Y
:X+8(G=34 and X*doesn't equal*30+8(Y=29))-8(G=25 and X*doesn't equal*14)->X
:Pxl-On(X,Y
:If Y=29 and (G=24 or G=85 or G=23:Then
:Pxl-Off(X,Y
:14->X
:1->Y
:Pxl-On(X,Y
:Text(11,31,"                       --------This is 23 spaces
:Text(19,31,"                                               -----This is 47 spaces
:Text(27,31,"                                   -----This is 35 spaces
:Text(35,31,"                       --------And again, 23 spaces
:End
:If G=26 or G=105 or G=21 or G=95:Then
:If Y=1:Then
:If X=14:Then
:Pxl-Off(X,Y
:29->Y
:Pxl-On(X,Y
:Text(11,31,"SIMPLE
:Text(19,31,"INTERMEDIATE
:Text(27,31,"DIFFICULT
:Text(35,31,"CHOOSE
:End
:If X=22:prgmSUDOKU1
:If X=30:Then
:ClrDraw:ClrHome:Stop
:End
:Else
:If X=14:Then
:         <----------------------------These all are left blank because I'm not yet sure what to do with each difficulty, and how to let the chooser choose which puzzle, or even where to store the puzzles. (I'm thinking using labels, but I know that those make the program go slower...)
:End                          |
:If X=22:Then                 |
:         <-------------------|
:End                          |
:If X=30:Then                 |
:         <-------------------|
:End                          |
:If X=38:Then                 |
:         <--------------------
:End:End:End:End

And one more thing, you may want to make the start up of your program so that it will input the puzzle, one number/space at a time, so to make the whole program more user-friendly. You know?

Last edited by MufinMcFlufin : May 26th, 2009 at 10:11 PM.

Reply With Quote
  Trader Rating: 0 · #21  
Old May 18th, 2009, 06:52 PM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
check the line of delvars and change delvar T to delvar L
srrys


1 more thing...lol...
You have to make sure the bounds are set to
0=Ymin
62=Ymax
0=Xmin
94=Xmax

Reply With Quote
  Trader Rating: 0 · #22  
Old May 20th, 2009, 02:10 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
check the line of delvars and change delvar T to delvar L
srrys


1 more thing...lol...
You have to make sure the bounds are set to
0=Ymin
62=Ymax
0=Xmin
94=Xmax

You sure that's all you have to change? For some reason it's still looping through the whole thing for me. And could you make a code that will let the user enter all the numbers in? It would look better than telling them to type all of them into a matrix, especially because most people who use calculators don't really know how to use them that well. Also, I finished the menu, and now just need to put all the levels in it and test them all. It had a MAJOR problem when I tried to insert an options button, and I literally had to reenter half the code, but it's working fine now, without the options button. I figured I should finish putting all the puzzles in first. And now that school's out (for me at least), I'll have plenty of time to work on it.

Last edited by MufinMcFlufin : May 22nd, 2009 at 12:08 PM.

Reply With Quote
  Trader Rating: 0 · #23  
Old May 26th, 2009, 02:42 PM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
Yea ive got an input program in the works, i just have to debug it now maybe ill post it later...
unfortunately, i have 100 pages of Fahrenheit 451 to read and analyze before i can finish it =(

Reply With Quote
  Trader Rating: 0 · #24  
Old May 26th, 2009, 10:09 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
Yea ive got an input program in the works, i just have to debug it now maybe ill post it later...
unfortunately, i have 100 pages of Fahrenheit 451 to read and analyze before i can finish it =(

Bummer...
I'm still entering all of these puzzles, and testing all of them. I got a little sidetracked since last Friday, when my brother helped me build a new computer, and ever since I've been getting all of the necessary files and updates, and all of that, but now I'm pretty sure I've gotten everything that I need, so I can get back to work on this program. I was also able to get TI Connect on this computer so I no longer have to use my brother's computer every time I want to put files on my calc or take any off, but for some reason it won't let me modify the programs like it would let me do on his computer. Anyways, this menu is done, and just needs the final 10 puzzles. If you want, I can try and help you out with that input program. Just post what you've got so far.
Oh, another thing!
I found out why your solver wasn't working for me. It turns out that near the end of the code where it says "1+L1(Z->L1(Z"
Code:
1->[B](A,X
End
1+L1(Z->L1(Z<--------Here
Z->[A](A,B
End:End

I accidentally had it store that value into list 2, instead of 1, which explained why it would continue to cycle when even after completion, but wouldn't do a single cycle when it's given as solved.
And lastly, I actually found a puzzle that it couldn't solve!
Here is the puzzle:
_ _ 6 _ 2 _ _ 4 _
7 _ 5 _ _ _ 8 _ _
9 _ _ 1 _ _ _ _ _
_ 7 _ _ 4 _ _ 2 _
_ _ _ 9 _ 1 _ _ _
_ 1 _ _ 5 _ _ 3 _
_ _ _ _ _ 9 _ _ 4
_ _ 2 _ _ _ 7 _ 5
_ 4 _ _ 8 _ 6 _ _
And here's the solution:
1 3 6 7 2 8 5 4 9
7 2 5 3 9 4 8 6 1
9 8 4 1 6 5 2 7 3
5 7 9 8 4 3 1 2 6
2 6 3 9 7 1 4 5 8
4 1 8 6 5 2 9 3 7
6 5 7 2 1 9 3 8 4
8 9 2 4 3 6 7 1 5
3 4 1 5 8 7 6 9 2
No I didn't make it up. I got it from my Super Sudoku book from Dollar General produced by Modern Publishing, puzzle number 162 out of 163. It figured 4 or 5 of the numbers until it couldn't find out any more and quit. Which I found explained the reason why you made your repeat code say L=18. That's so it will quit if it checks each number twice, and still wasn't able to find a new number. Right?

Last edited by MufinMcFlufin : May 27th, 2009 at 09:39 PM.

Reply With Quote
  Trader Rating: 0 · #25  
Old May 27th, 2009, 10:25 PM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
Quote:
Originally Posted by MufinMcFlufin
Bummer...
I'm still entering all of these puzzles, and testing all of them. I got a little sidetracked since last Friday, when my brother helped me build a new computer, and ever since I've been getting all of the necessary files and updates, and all of that, but now I'm pretty sure I've gotten everything that I need, so I can get back to work on this program. I was also able to get TI Connect on this computer so I no longer have to use my brother's computer every time I want to put files on my calc or take any off, but for some reason it won't let me modify the programs like it would let me do on his computer. Anyways, this menu is done, and just needs the final 10 puzzles. If you want, I can try and help you out with that input program. Just post what you've got so far.
Oh, another thing!
I found out why your solver wasn't working for me. It turns out that near the end of the code where it says "1+L1(Z->L1(Z"
Code:
1->[B](A,X
End
1+L1(Z->L1(Z<--------Here
Z->[A](A,B
End:End

I accidentally had it store that value into list 2, instead of 1, which explained why it would continue to cycle when even after completion, but wouldn't do a single cycle when it's given as solved.
And lastly, I actually found a puzzle that it couldn't solve!
Here is the puzzle:
_ _ 6 _ 2 _ _ 4 _
7 _ 5 _ _ _ 8 _ _
9 _ _ 1 _ _ _ _ _
_ 7 _ _ 4 _ _ 2 _
_ _ _ 9 _ 1 _ _ _
_ 1 _ _ 5 _ _ 3 _
_ _ _ _ _ 9 _ _ 4
_ _ 2 _ _ _ 7 _ 5
_ 4 _ _ 8 _ 6 _ _
And here's the solution:
1 3 6 7 2 8 5 4 9
7 2 5 3 9 4 8 6 1
9 8 4 1 6 5 2 7 3
5 7 9 8 4 3 1 2 6
2 6 3 9 7 1 4 5 8
4 1 8 6 5 2 9 3 7
6 5 7 2 1 9 3 8 4
8 9 2 4 3 6 7 1 5
3 4 1 5 8 7 6 9 2
No I didn't make it up. I got it from my Super Sudoku book from Dollar General produced by Modern Publishing, puzzle number 162 out of 163. It figured 4 or 5 of the numbers until it couldn't find out any more and quit. Which I found explained the reason why you made your repeat code say L=18. That's so it will quit if it checks each number twice, and still wasn't able to find a new number. Right?


actually....from L=0 to L=9? it tests on lines, like if there is a spot in a line where only a certain number can go it puts it there
from L=9 to L=18 it looks in boxes but not lines...does that make sense?
If it cant find any numbers in a box or line it quits
the reason it doesnt do boxes until it cant find any lines is because boxes actually dont happen often and testing lines is a LOT faster than boxes

Reply With Quote
  Trader Rating: 0 · #26  
Old May 29th, 2009, 11:36 AM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
actually....from L=0 to L=9? it tests on lines, like if there is a spot in a line where only a certain number can go it puts it there
from L=9 to L=18 it looks in boxes but not lines...does that make sense?
If it cant find any numbers in a box or line it quits
the reason it doesnt do boxes until it cant find any lines is because boxes actually dont happen often and testing lines is a LOT faster than boxes

That's true
I get it
That would explain why in certain parts of the code it had 2 for loops going from 0 to 2
So from 0 to 9 does it check both vertical and horizontal each time? And another question: you said earlier that it doesn't guess where numbers are, it figures them out. Is that because it checks each line and sees if a number is missing? Or does it use another method?

Last edited by MufinMcFlufin : May 29th, 2009 at 11:50 AM.

Reply With Quote
  Trader Rating: 0 · #27  
Old June 4th, 2009, 08:17 AM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
yes it checks vertical and horizontal every time
what it does is it goes thru the matrix and stores a number to every place Z(the # its working on) cant be
Thats where the -1s come in
Then it checks the lines or boxes and if there is only 1 space Z can be, it puts it there

o i finished the sudoku editor ill post it soon

Reply With Quote
  Trader Rating: 0 · #28  
Old June 4th, 2009, 07:06 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
yes it checks vertical and horizontal every time
what it does is it goes thru the matrix and stores a number to every place Z(the # its working on) cant be
Thats where the -1s come in
Then it checks the lines or boxes and if there is only 1 space Z can be, it puts it there

o i finished the sudoku editor ill post it soon

I just made a help option of the menu and it includes credits, stating that you made the solver and I did the game and menu, and clear instructions about how to play the game, what both the game and solver use (matrices, variable, etc.), and when you post the editor, I'll finish it up with how to use the solver.
I'll post it in a bit, I'm just a little busy right now.

Reply With Quote
  Trader Rating: 0 · #29  
Old June 23rd, 2009, 07:57 AM
calcfreak calcfreak is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 33 calcfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 41 sec
Reputation Power: 2
well this is a little late but here it is...
its kinda slow but whatever...
Just put this code at the start of the program
Code:
ClrDraw
FnOff
AxesOff
GridOff
0->Xmin
0->Ymin
94->Xmax
62->Ymax
Text(0,60, Current
Line(0,4,0,62
Line(0,4,58,62
Line(58,4,58,62
Line(58,62,0,62
Delvar L1 Delvar L2 Delvar L Delvar Z
1->dim(L3
9->dim(L1
Fill(0,L1
{9,9->dim([A]
Fill(0,[A]
For(X,0,2
For(Y,0,3
Line(2,5+19X+6Y,57,5+19X+6Y
Line(19X+6Y+1,5,19X+6Y+1
End
End
5->X:5->Y
Repeat G=105
Text(0,90,[A](Y,X
getKey->G
6Y+ipart((Y-1)/3->A
6X+ipart((X-1)/3
Line(Ans,62-A,Ans,67-A
Line(Ans-4,62-Ans,Ans-4,67-Ans
If not(G
Then
For(B,0,4                                             ;yea it would be shorter to have another for here, but it slows animation down
Pxl-Change(A-B,Ans-1
Pxl-Change(A-B,Ans-2
Pxl-Change(A-B,Ans-3
End
End
While not(G
getKey->G
End
If G=45 or G=23
0->[A](Y,X
If sum(G={92,93,94,82,83,84,72,73,74         ;easiest way to check if a variable equals any of a bunch of numbers
3ipart(10.4-.1G)-4+10fpart(.1G->[A](Y,X
[A](Y,X
If not(Ans
"                          ;4 spaces
Text(6Y-5+ipart((Y-1)/3),6X-4+ipart(X-1)/3)," ",Ans         ;1 space
6Y+ipart((Y-1)/3
Line(0,67-Ans,57,67-Ans
X+(G=26)-(G=24->X
Y+(G=34)-(G=25->Y
X-9(X=10)+9not(X->X
Y-9(Y=10)+9not(Y->Y
End
For(X,1,9
For(Y,1,9
If [A](Y,X
1+L1([A](Y,X->L1([A](Y,X
End
End
startTmr->S
Repeat L=18 or 81=sum(L1
[A]->[B]

nothing in the program has been changed from there down


basically you just run the program
arrows keys move the cursor
press a number to place that number in the box
press either clear or del to remove a number from the box
press enter to stop editing and launch the solver

Reply With Quote
  Trader Rating: 0 · #30  
Old June 24th, 2009, 04:52 PM
MufinMcFlufin's Avatar
MufinMcFlufin MufinMcFlufin is offline
The Muffinator
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Location: South Eastern USA
Posts: 205 MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level)MufinMcFlufin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 59 m 58 sec
Reputation Power: 95
Quote:
Originally Posted by calcfreak
well this is a little late but here it is...
its kinda slow but whatever...
Just put this code at the start of the program
Code:
ClrDraw
FnOff
AxesOff
GridOff
0->Xmin
0->Ymin
94->Xmax
62->Ymax
Text(0,60, Current
Line(0,4,0,62
Line(0,4,58,62
Line(58,4,58,62
Line(58,62,0,62
Delvar L1 Delvar L2 Delvar L Delvar Z
1->dim(L3
9->dim(L1
Fill(0,L1
{9,9->dim([A]
Fill(0,[A]
For(X,0,2
For(Y,0,3
Line(2,5+19X+6Y,57,5+19X+6Y
Line(19X+6Y+1,5,19X+6Y+1
End
End
5->X:5->Y
Repeat G=105
Text(0,90,[A](Y,X
getKey->G
6Y+ipart((Y-1)/3->A
6X+ipart((X-1)/3
Line(Ans,62-A,Ans,67-A
Line(Ans-4,62-Ans,Ans-4,67-Ans
If not(G
Then
For(B,0,4                                             ;yea it would be shorter to have another for here, but it slows animation down
Pxl-Change(A-B,Ans-1
Pxl-Change(A-B,Ans-2
Pxl-Change(A-B,Ans-3
End
End
While not(G
getKey->G
End
If G=45 or G=23
0->[A](Y,X
If sum(G={92,93,94,82,83,84,72,73,74         ;easiest way to check if a variable equals any of a bunch of numbers
3ipart(10.4-.1G)-4+10fpart(.1G->[A](Y,X
[A](Y,X
If not(Ans
"                          ;4 spaces
Text(6Y-5+ipart((Y-1)/3),6X-4+ipart(X-1)/3)," ",Ans         ;1 space
6Y+ipart((Y-1)/3
Line(0,67-Ans,57,67-Ans
X+(G=26)-(G=24->X
Y+(G=34)-(G=25->Y
X-9(X=10)+9not(X->X
Y-9(Y=10)+9not(Y->Y
End
For(X,1,9
For(Y,1,9
If [A](Y,X
1+L1([A](Y,X->L1([A](Y,X
End
End
startTmr->S
Repeat L=18 or 81=sum(L1
[A]->[B]

nothing in the program has been changed from there down


basically you just run the program
arrows keys move the cursor
press a number to place that number in the box
press either clear or del to remove a number from the box
press enter to stop editing and launch the solver

Well, I tried it out, and so far, it showed most of a box with a diagonal going from the bottom left corner to the upper right corner, said CURRENT: in the top right, and then got a syntax. It looks like you're missing one of the parameters in the second Line( command shown here near the beginning of the code:
Code:
For(X,0,2
For(Y,0,3
Line(2,5+19X+6Y,57,5+19X+6Y
Line(19X+6Y+1,5,19X+6Y+1            ;this one
End
End

I was able to figure out that it's suppose to have ,61 at the end as the last parameter, but soon I encountered another error. The cursor doesn't work quite as it should. The left most line of the Pxl-Change's is (almost) always in the wrong position. When the cursor is in the 3rd column going right, the left-most line will be in the 3rd row going down. Can you see what went wrong? Other than that, everything works fine. I also wanted to mention that the menu will have the same window range that you inputted, along with Axesoff, and Gridoff, so you might as well take those out to save some memory.
Anyways, I can't figure out your cursor. Not the part that doesn't work, but how it goes so fast. Mine uses 4 lines around each number, and still doesn't go as fast.
Speaking of which, I'm still adding this and that to my code, so I don't quite yet want to put it out on the web, but I'll give you some screen shots of it and the menu I have currently.
Attached Files
File Type: rar Screenshots.rar (51.1 KB, 26 views)
__________________
日本のクールだ
Ich liebe Deutsch!

TI BASIC Tutor

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWARETI 83/84 > Sudoku program tips


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
     
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 11 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek