Eh, if someone were to choose a black or dark square color, then the black pieces disappear :< I mean, I guess it could be done, but would it benefit anything?
Well, I'd make the pieces color customizable, too. The only benefit is users like choice.
I suppose so. I'll see what I can come up with, then.


So, I've implemented the custom board stuff that merthsoft suggested. Hopefully the menu aspect of it is intuitive enough.

http://tifreakware.net/tifreak8x/checkers/CHECKERS.8xp

Would be appreciative of anyone willing to throw that at their calculator, see what you all might think. Smile Left/Right arrows change the colors, up/down arrows move the cursor, 2nd generates the board.
That looks great! And I see I still need to fix small rectangles of color arbitrarily not getting updated in screenshots, which is frustrating. I took a look at your code, and it seems that you don't prevent the user picking the same colors for Square 1/Square 2 or Player 1/Player 2. If I am correct in my reading of your code, is that something you might want to add, or does it fall under the heading of 'don't be dumb'?
Haha

I could possibly do that, wouldn't be horridly difficult to add in Smile

I was tickled pink with the fact I was able to keep the Line( command just 1 line and still have it bounce between the two colors.

I'll see about adding that checker into the code tomorrow. Hopefully what you saw of my code wasn't too horridly unoptimized.


Added same color checking for square 2 and the checkers, and between the two checkers. Smile
Nice job, that is a great way to handle it! What's next? Also, please nag me to fix that screenshotting code. Sad
Next up is checkers generation and list setup. Once I get that done, I have to see how I want to do cursor stuff. Smile

Edit:

Didn't realize it before, but the board is supposed to start with a dark panel, so I fixed that.

Now on to other things.
This is very nice. The color selecting looks perfect.
Thank you merth! Smile I wanted to keep it as simple as possible.
What's the current state of affairs, tifreak8x? I don't mean to nag, just to keep you motivated that there are people interested in the progress of your projects. Smile I know you have a busy life, so I understand if this is status quo.
For the last couple of days, I've sat and stared at the code and have gotten no where with checker generation. Not sure what is wrong, things just aren't clicking at the moment. Nothing else has really been done to the project since I added support for customized tiles and checkers.
tifreak8x wrote:
For the last couple of days, I've sat and stared at the code and have gotten no where with checker generation. Not sure what is wrong, things just aren't clicking at the moment. Nothing else has really been done to the project since I added support for customized tiles and checkers.
Sorry to hear it; anything I can do to help? What do you mean about checker generation? Also, are you storing the checker positions in a list (like Connect4) or a matrix this time around?
I'm going with the list system. And I think what I'm doing with the lists was wrong, so I need to rewrite what I had written to match what Connect4 was, maybe that will be a bit less confusing.

And as to checker generation, the checkers can only be on certain fields, and they have to show up in their proper places at the start, etc. Just something I'll have to program around, which I think I can do now.
tifreak8x wrote:
The AI wouldn't be all that hard, I would think, but I could be wrong.

Famous last words of programmers. Very Happy

Professor Jonathan Schaeffer, the definitive expert in checkers programming, wrote a book (One Jump Ahead) about his experiences in the field. The opening chapter is called "This Was Going To Be Easy." He spent the next two decades working on it. It turns out that checkers is a deceptive game in the the rules are easy, but the strategy is deep.

You might want to check out the Windows program CheckerBoard. Besides the incredibly strong default engine, it also comes with an engine called "Simple Checkers" along with free-to-use source code.

-wes
Wes wrote:
tifreak8x wrote:
The AI wouldn't be all that hard, I would think, but I could be wrong.

Famous last words of programmers. Very Happy

Professor Jonathan Schaeffer, the definitive expert in checkers programming, wrote a book (One Jump Ahead) about his experiences in the field. The opening chapter is called "This Was Going To Be Easy." He spent the next two decades working on it. It turns out that checkers is a deceptive game in the the rules are easy, but the strategy is deep.

You might want to check out the Windows program CheckerBoard. Besides the incredibly strong default engine, it also comes with an engine called "Simple Checkers" along with free-to-use source code.

-wes


Though last I heard, Checkers is actually solved in the game-theoretic sense, as compared to Chess or Go which have a much larger outcome space.
elfprince13 wrote:
Though last I heard, Checkers is actually solved in the game-theoretic sense, as compared to Chess or Go which have a much larger outcome space.

Yes, Dr. Schaeffer and his team from U. of Alberta "solved" it in 2007. I suspect we're many decades (centuries?) away from solving chess.

Check out http://en.wikipedia.org/wiki/Solving_chess#Predictions_on_when.2Fif_chess_will_be_solved

Most people view checkers as a child's game, like swimming across a pond. Actually, it's more like trying to swim to The Bahamas. (Chess is like trying to swim around the world. Smile )

-wes
Wes wrote:
elfprince13 wrote:
Though last I heard, Checkers is actually solved in the game-theoretic sense, as compared to Chess or Go which have a much larger outcome space.

Yes, Dr. Schaeffer and his team from U. of Alberta "solved" it in 2007. I suspect we're many decades (centuries?) away from solving chess.

Check out http://en.wikipedia.org/wiki/Solving_chess#Predictions_on_when.2Fif_chess_will_be_solved

Most people view checkers as a child's game, like swimming across a pond. Actually, it's more like trying to swim to The Bahamas. (Chess is like trying to swim around the world. Smile )

-wes

And Go is like trying to swim to the moon Wink
So, I was thinking about being able to move the cursor. Should I use the number pad to make it go diagonal, or should I just use the main arrows so it only goes 4 directions?

I'm going to try once again to get it to place the appropriate checkers on the board.

Edit:

Well, I've managed to get it to put checkers on the screen, just not in the right spots on the board. I need to rearrange my For( loops, and make changes to the positions of the checkers themselves.


Code:
ClrDraw:AxesOff
GridOff
SetUpEditor L3
SetUpEditor L1
32->dim(L1
{2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1->L1
{2,4,5,6,6,7,7,7->L3
BackgroundOff
0->Xmin:0->Ymin:1->I
264->Xmax:164->Ymax
11->S:23->T:11->U:12->V
1->W:7->A
TextColor(Red
Text(7,15,"Square 1:  "
Text(27,15,"Square 2:  "
Text(47,15,"Player 1:  "
Text(67,15,"Player 2:  "
Text(150,1,"2nd to proceed
While W=1
For(G,2,18,2
Line(88,140+G,88+18,140+G,1,S,2
End
For(G,2,18,2
Line(88,120+G,88+18,120+G,1,T,2
End
For(F,1,8
L3(F
Line(97-Ans,102+F,97+Ans,102+F,1,U,2
Line(97-Ans,16-F+102,97+Ans,16-F+102,1,U,2
End
For(F,1,8
L3(F
Line(97-Ans,82+F,97+Ans,82+F,1,V,2
Line(97-Ans,16-F+82,97+Ans,16-F+82,1,V,2
End
2->W:While W=2
getKey->K
Text(A,1,"|>
If K:Text(A,1,"   
A-20((A>7 and K=25)-(A<67 and K=34->A
If K=24 or K=26:Then
If A=7:Then
S-1((S>10 and K=24)-(S<24 and K=26->S
For(G,2,18,2
Line(88,140+G,88+18,140+G,1,S,2
End:End
If A=27:Then
T-1((T>10 and K=24)-(T<24 and K=26->T
For(G,2,18,2
Line(88,120+G,88+18,120+G,1,T,2
End:End
If A=47:Then
U-1((U>10 and K=24)-(U<24 and K=26->U
For(F,1,8
L3(F
Line(97-Ans,102+F,97+Ans,102+F,1,U,2
Line(97-Ans,16-F+102,97+Ans,16-F+102,1,U,2
End:End
If A=67:Then
V-1((V>10 and K=24)-(V<24 and K=26->V
For(F,1,8
L3(F
Line(97-Ans,82+F,97+Ans,82+F,1,V,2
Line(97-Ans,16-F+82,97+Ans,16-F+82,1,V,2
End:End
End
If K=21:Then
If U!=T and V!=T and U!=V:3->W
If U=T or V=T or U=V:Then
TextColor(randInt(10,24
Text(90,1,"CHECKERS CANNOT BE THE SAME
Text(103,1,"AS SQUARE 2 OR EACHOTHER!
TextColor(11
End:End
End:End
ClrDraw
For(F,4,156,19
Line(7,F,167,F,1,12,1
End
For(F,7,167,20
Line(F,4,F,156,1,12,1
End
For(H,8,166,20
not(I->I
For(F,4,138,19
not(I->I
For(G,2,18,2
Line(H,F+G,H+18,F+G,1,S(I=0)+TI,2
End:End:End
5->theta
For(F,1,8
not(I->I
TextColor(11+I
Text(~1,theta,175,sub("CHECKERS",F,1
theta+20->theta
End
2->theta
Text(~1,75,205,"BY:
For(F,1,12
not(I->I
TextColor(11+I
Text(theta,254,sub("TI-FREAKWARE",F,1
theta+13->theta
End
1->I:1->G
For(J,4,138,19
not(I->I
For(H,166,8,~20-20I
not(I->I
For(F,1,8
L3(F
Line(J-Ans,(H-7)+F,J+Ans,(H-7)+F,1,U(L1(G)=1)+V(L1(G)=2),2
Line(J-Ans,16-F+(H-7),J+Ans,16-F+(H-7),1,U(L1(G)=1)+V(L1(G)=2),2
End
G+1->G
End:End


I'll mess with it more tomorrow sometime. :/
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement