Code:
0->Xmin:0->Ymin:1->I
264->Xmax:164->Ymax
ClrDraw:AxesOff
GridOff
RecallPic Pic5

3->W
{1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2->L1
{0,0,10,108,100,0->L2
{2,4,5,6,6,7,7,7->L3
48->A:43->B:1->I:1->C:DelVar D
11->S:23->T:11->U:12->V:20->R
While W=3
(((((A-8)/20)+1)*4)-4)+(((B+14)/19)+1(fPart(((B+14)/19)/2)=.5))/2->E
Text(1,200,I
Text(14,200,E
Text(27,200,C
Text(40,200,D
Text(53,200,fPart(L1(L2(3
Text(1,230,L2(3
Line(A,B,A+18,B,1,R,1
Line(A,B,A,B+17,1,R,1
Line(A+18,B,A+18,B+17,1,R,1
Line(A,B+17,A+18,B+17,1,R,1
getKey->K
If K:Then
Line(A,B,A+18,B,1,T(I=1)+S(I=0),1
Line(A,B,A,B+17,1,T(I=1)+S(I=0),1
Line(A+18,B,A+18,B+17,1,T(I=1)+S(I=0),1
Line(A,B+17,A+18,B+17,1,T(I=1)+S(I=0),1
End
B-19((K=34 and B>5)-(K=25 and B<138->B
A-20((K=24 and A>8)-(K=26 and A<148->A
If max(K={24,25,26,34:not(I->I
If K=22:Return
If K=21 and I=1:Then
0->Z
(((((A-8)/20)+1)*4)-4)+(((B+14)/19)+1(fPart(((B+14)/19)/2)=.5))/2->E

If D>0:Then
If C=1:Then
If fPart(L1(L2(3)))=0:Then
Pause
If (E-L1(L2(3))=~4 or E-L1(L2(3))=4) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+20I,(B-7)+F,A+Ans+20I,(B-7)+F,1,U,2
Line(A-Ans+20I,16-F+(B-7),A+Ans+20I,16-F+(B-7),1,U,2
End
A->L2(1:B->L2(2:L2(3->L1(E
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End
If fPart(L1(L2(3)))=.5:Then
If (E=L2(3)+1 or E=L2(3)-1 or E=L2(3)+3 or E=L2(3)+4 or E=L2(3)-4 or E=L2(3)-5) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+20I,(B-7)+F,A+Ans+20I,(B-7)+F,1,U,2
Line(A-Ans+20I,16-F+(B-7),A+Ans+20I,16-F+(B-7),1,U,2
End
A->L2(1:B->L2(2:L2(3->L1(E
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End
End:"C=1
End:"D>0
If D=0:Then
If C=L1(E:Then
Line(A+1,B+3,A+3,B+1,1,R,1
Line(A+1,B+14,A+3,B+16,1,R,1
Line(A+17,B+3,A+15,B+1,1,R,1
Line(A+17,B+14,A+15,B+16,1,R,1
C->D
If C=1:Then
A->L2(1:B->L2(2:E->L2(3:End
If C=2:Then
A->L2(4:B->L2(5:E->L2(6:End
End:End
End:"K=21
End:"W=3


I know that the offending bit of code is "If (E-L1(L2(3))=~4 or E-L1(L2(3))=4) and L1(E)=0:Then" because it hits the Pause before it, but refuses to do anything after that. It makes no sense because the values are correct.

I can't figure out for the life of me why the checkers won't move now. Neutral

And yes, all the values match up properly. There doesn't appear to be a reason why it's not working. :< I will, of course, keep testing.
So, update.

I've managed to make this move each player's checker once. To the right if you are player 1, or to the left if you are player 2. I'm not sure why you can only move once, but at least I'm finally moving this off in the right direction, after days of no progress. Smile



I'm thinking it's some form of list issue, but I'm not sure. I'll do some more extensive testing tomorrow sometime.

code for the engine thus far:


Code:
0->Xmin:0->Ymin:1->I
264->Xmax:164->Ymax
ClrDraw:AxesOff
GridOff
RecallPic Pic5

3->W
{1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2->L1
{0,0,10,108,100,23->L2
{2,4,5,6,6,7,7,7->L3
48->A:43->B:1->I:1->C:DelVar D
11->S:23->T:11->U:12->V:20->R
While W=3
Line(A,B,A+18,B,1,R,1
Line(A,B,A,B+17,1,R,1
Line(A+18,B,A+18,B+17,1,R,1
Line(A,B+17,A+18,B+17,1,R,1
getKey->K
If K:Then
Line(A,B,A+18,B,1,T(I=1)+S(I=0),1
Line(A,B,A,B+17,1,T(I=1)+S(I=0),1
Line(A+18,B,A+18,B+17,1,T(I=1)+S(I=0),1
Line(A,B+17,A+18,B+17,1,T(I=1)+S(I=0),1
End
B-19((K=34 and B>5)-(K=25 and B<138->B
A-20((K=24 and A>8)-(K=26 and A<148->A
If max(K={24,25,26,34:not(I->I
If K=22:Return
If K=21 and I=1:Then
0->Z
(((((A-8)/20)+1)*4)-4)+(((B+14)/19)+1(fPart(((B+14)/19)/2)=.5))/2->E
If D>0:Then
If C=1:Then
If fPart(L1(L2(3)))=0:Then
If (E-L2(3)=~4 or E-L2(3)=4) and A>L2(1) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End:"fpart0
If fPart(L1(L2(3)))=.5:Then
If (E=L2(3)+1 or E=L2(3)-1 or E=L2(3)+3 or E=L2(3)+4 or E=L2(3)-4 or E=L2(3)-5) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End
End:"C=1
If C=2:Then
If fPart(L1(L2(6)))=0:Then
If (E-L2(6)=~4 or E-L2(6)=4) and A<L2(4) and L1(E)=0:Then
For(G,2,18,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
End
End:"fpart0
If fPart(L1(L2(6)))=.5:Then
If (E=L2(3)+1 or E=L2(3)-1 or E=L2(3)+3 or E=L2(3)+4 or E=L2(3)-4 or E=L2(3)-5) and L1(E)=0:Then
For(G,2,18,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
End
End
End:"C=2
End:"D>0
If D=0:Then
If C=L1(E:Then
Line(A+1,B+3,A+3,B+1,1,R,1
Line(A+1,B+14,A+3,B+16,1,R,1
Line(A+17,B+3,A+15,B+1,1,R,1
Line(A+17,B+14,A+15,B+16,1,R,1
C->D
If C=1:Then
A->L2(1:B->L2(2:E->L2(3:End
If C=2:Then
A->L2(4:B->L2(5:E->L2(6:End
End:
End
End:"K=21
End:"W=3


Far from clean code, just been moving things around and hacking things together to try to make things work. Cleaner code at some point in the future.


Edit:

Note to self, I need to shorten the clearing of checker pieces, so not to clear out the board black lines.

Code:
0->Xmin:0->Ymin:1->I
264->Xmax:164->Ymax
ClrDraw:AxesOff
GridOff
RecallPic Pic5

3->W
{1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2->L1
{0,0,10,108,100,23->L2
{2,4,5,6,6,7,7,7->L3
48->A:43->B:1->I:1->C:DelVar D
11->S:23->T:11->U:12->V:20->R
While W=3
Text(1,200,"C ",C
Text(14,200,"D ",D
Text(27,200,"E ",E
Text(40,200,"I ",I
Text(53,200,"L1(E ",L1(E
Line(A,B,A+18,B,1,R,1
Line(A,B,A,B+17,1,R,1
Line(A+18,B,A+18,B+17,1,R,1
Line(A,B+17,A+18,B+17,1,R,1
getKey->K
If K:Then
Line(A,B,A+18,B,1,T(I=1)+S(I=0),1
Line(A,B,A,B+17,1,T(I=1)+S(I=0),1
Line(A+18,B,A+18,B+17,1,T(I=1)+S(I=0),1
Line(A,B+17,A+18,B+17,1,T(I=1)+S(I=0),1
End
B-19((K=34 and B>5)-(K=25 and B<138->B
A-20((K=24 and A>8)-(K=26 and A<148->A
If max(K={24,25,26,34:not(I->I
If K=22:Return
If K=21 and I=1:Then
0->Z
(((((A-8)/20)+1)*4)-4)+(((B+14)/19)+1(fPart(((B+14)/19)/2)=.5))/2->E
If D>0:Then
If C=1:Then
If fPart(L1(L2(3)))=0:Then
If (L2(3)-E=4 or E-L2(3)=4) and B>L2(2) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End:"fpart0
If fPart(L1(L2(3)))=.5:Then
If (E=L2(3)+1 or E=L2(3)-1 or E=L2(3)+3 or E=L2(3)+4 or E=L2(3)-4 or E=L2(3)-5) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End
End
If C=2:Then
If fPart(L1(L2(6)))=0:Then
If (E-L2(6)=~4 or E-L2(6)=4) and B<L2(5) and L1(E)=0:Then
For(G,2,18,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
End
End
If fPart(L1(L2(6)))=.5:Then
If (E=L2(3)+1 or E=L2(3)-1 or E=L2(3)+3 or E=L2(3)+4 or E=L2(3)-4 or E=L2(3)-5) and L1(E)=0:Then
For(G,2,18,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
End
End
End
End
If D=0:Then
If C=L1(E:Then
Line(A+1,B+3,A+3,B+1,1,R,1
Line(A+1,B+14,A+3,B+16,1,R,1
Line(A+17,B+3,A+15,B+1,1,R,1
Line(A+17,B+14,A+15,B+16,1,R,1
C->D
If C=1:Then
A->L2(1:B->L2(2:E->L2(3:End
If C=2:Then
A->L2(4:B->L2(5:E->L2(6:End
End
End
End
End


Now we move around properly, but you can only move a checker once. After that, you can't move it again, and I've no idea why.


http://tifreakware.net/tifreak8x/checkers/AB.zip

That should be the program and the pic var needed to make it work. For now, to speed up testing, I've just stored the board and checkers as a pic var so I can quickly test changes made to the code. Smile

Last edit, I hope. You use 2nd to select a checker. I haven't added the code yet to deselect your checker.


Edit 2:

Need to add in code to block I from changing if the cursor is on the border and doesn't really move.

Edit 3:

Need to change how determining distance of movement is done via cursor variables instead of subtracting last known list element to new list element. Since on the first shot, it was +/-4, the second time you go to move the checker, it was actually -3/+5. Can't use that method reliably, so verifying that L2(1/4) +/-19 and L2(2/5) +/-20 will give me the results I want!
So! Checkers now go all the way across the board, they don't overwrite other checkers, and you can only select the checkers that is for your turn.

Things to do now:

-Make it so only does the I switching when the cursor actually moves
-Make it so you can jump opposing checkers
-Make it so you can be crowned
-Need to be able to remove the selection on a checker, with Alpha
-Maybe make it store as a Picvar when the board is generated as a quick way of restoring the board for a rematch?

Anything else I'm missing?

Edit:



http://tifreakware.net/tifreak8x/checkers/AB.zip

2nd to select, Alpha to cancel selection, MODE to exit the program.

Thoughts?
Yes! Looks perfect!

You've really embraced the 84C tifreak, superb work as always Smile.
Thank you tr1p1ea! There is still a bit to do with this, but I think it's finally coming along nicely Smile

I need to add a box off to the right that shows the color of the checker for whose turn it is. Maybe something that shows how many pieces lost? Not sure that's relevant, but might assist in giving me a form of win detection.. Hmm..


I finally have made it so you can take eachother's checkers! Very Happy

Thoughts? Smile
Congratz, looks great Smile
This is really coming along tifreak, and looking wonderful! Smile
Thanks guys! Very Happy

I promise it's more responsive than what the screenshot shows, doing animated screenies makes key presses hard to detect or something.

I'm not sure I'll be able to support multi-jumping. I've not thought of a way yet that won't bloat the code horridly.

I still need to have it display who's turn it is, and make it so accidentally hitting the border of the board and pressing again in that direction doesn't break things.
It looks pretty responsive to me from the screenshot, tifreak8x. Smile How do you currently support single-jumping that would work poorly extended to multi-jumping? I was thinking you could have the user specify a sequence of steps, as long as each step involved jumping over an opposing piece. The first step to not involve jumping an opposing piece would prevent the user from adding any more moves to the chain.
Basically, anytime you select a checker, it stores those values to 2 elements in a list. Player 1 gets 3 elements, player 2 gets the same. It also stores the last list element accessed for the board list.


Code:
0->Xmin:0->Ymin:1->I
264->Xmax:164->Ymax
ClrDraw:AxesOff
GridOff
RecallPic Pic5

3->W
{1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2,1,1,0,2,1,0,2,2->L1
{0,0,10,108,100,23->L2
{2,4,5,6,6,7,7,7->L3
48->A:43->B:1->I:1->C:DelVar D
11->S:23->T:11->U:12->V:20->R
While W=3
Line(A,B,A+18,B,1,R,1
Line(A,B,A,B+17,1,R,1
Line(A+18,B,A+18,B+17,1,R,1
Line(A,B+17,A+18,B+17,1,R,1
getKey->K
If K:Then
Line(A,B,A+18,B,1,T(I=1)+S(I=0),1
Line(A,B,A,B+17,1,T(I=1)+S(I=0),1
Line(A+18,B,A+18,B+17,1,T(I=1)+S(I=0),1
Line(A,B+17,A+18,B+17,1,T(I=1)+S(I=0),1
End
B-19((K=34 and B>5)-(K=25 and B<138->B
A-20((K=24 and A>8)-(K=26 and A<148->A
If max(K={24,25,26,34:not(I->I
If K=22:Return
If K=31 and D>0:Then
If C=1:Then
Line(L2(1)+1,L2(2)+3,L2(1)+3,L2(2)+1,1,T,1
Line(L2(1)+1,L2(2)+14,L2(1)+3,L2(2)+16,1,T,1
Line(L2(1)+17,L2(2)+3,L2(1)+15,L2(2)+1,1,T,1
Line(L2(1)+17,L2(2)+14,L2(1)+15,L2(2)+16,1,T,1
End
If C=2:Then
Line(L2(4)+1,L2(5)+3,L2(4)+3,L2(5)+1,1,T,1
Line(L2(4)+1,L2(5)+14,L2(4)+3,L2(5)+16,1,T,1
Line(L2(4)+17,L2(5)+3,L2(4)+15,L2(5)+1,1,T,1
Line(L2(4)+17,L2(5)+14,L2(4)+15,L2(5)+16,1,T,1
End
0->D
End
If K=21 and I=1:Then
0->Z
(((((A-8)/20)+1)*4)-4)+(((B+14)/19)+1(fPart(((B+14)/19)/2)=.5))/2->E
If D>0:Then
If C=1:Then
If fPart(L1(L2(3)))=0:Then
If B-L2(2)=38 and (A-L2(1)=40 or L2(1)-A=40) and L1(E)=0:Then
A-20(A>L2(1))+20(A<L2(1)->N:B-19->O
(((((N-8)/20)+1)*4)-4)+(((O+14)/19)+1(fPart(((O+14)/19)/2)=.5))/2->theta
If L1(theta)=2:Then
For(G,2,16,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(G,2,16,2
Line(N,O+G,N+18,O+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
0->L1(theta
End
End
If B-L2(2)=19 and (L2(1)-A=20 or A-L2(1)=20) and L1(E)=0:Then
For(G,2,16,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End
If fPart(L1(L2(3)))=.5:Then
If (L2(1)+20=A and (L2(2)+19=B or L2(2)-19=B)) or (L2(1)-20=A and (L2(2)+19=B or L2(2)-19=B) and L1(E)=0:Then
For(G,2,18,2
Line(L2(1),L2(2)+G,L2(1)+18,L2(2)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,U,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,U,2
End
A->L2(1:B->L2(2:L1(L2(3->L1(E:0->L1(L2(3:E->L2(3
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(4->A:L2(5->B:2->C:DelVar D
End
End
End
If C=2:Then
If fPart(L1(L2(6)))=0:Then
If L2(5)-B=38 and (A-L2(4)=40 or L2(4)-A=40) and L1(E)=0:Then
A-20(A>L2(4))+20(A<L2(4)->N:B+19->O
(((((N-8)/20)+1)*4)-4)+(((O+14)/19)+1(fPart(((O+14)/19)/2)=.5))/2->theta
If L1(theta)=1:Then
For(G,2,16,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(G,2,16,2
Line(N,O+G,N+18,O+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
0->L1(theta
End
End
If L2(5)-B=19 and (A-L2(4)=20 or L2(4)-A=20) and L1(E)=0:Then
For(G,2,16,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
End
End
If fPart(L1(L2(6)))=.5:Then
If (L2(4)+20=A and (L2(5)+19=B or L2(5)-19=B)) or (L2(4)-20=A and (L2(5)+19=B or L2(5)-19=B) and L1(E)=0:Then
For(G,2,16,2
Line(L2(4),L2(5)+G,L2(4)+18,L2(5)+G,1,T,2
End
For(F,1,8
L3(F
Line(A-Ans+9,(B-7)+F+8,A+Ans+9,(B-7)+F+8,1,V,2
Line(A-Ans+9,16-F+(B-7)+8,A+Ans+9,16-F+(B-7)+8,1,V,2
End
A->L2(4:B->L2(5:L1(L2(6->L1(E:0->L1(L2(6:E->L2(6
If fPart(L1(E))=.5:Pt-On(A+9,B+8,3,19
L2(1->A:L2(2->B:1->C:DelVar D
End
End
End
End
If D=0:Then
If C=L1(E:Then
Line(A+1,B+3,A+3,B+1,1,R,1
Line(A+1,B+14,A+3,B+16,1,R,1
Line(A+17,B+3,A+15,B+1,1,R,1
Line(A+17,B+14,A+15,B+16,1,R,1
C->D
If C=1:Then
A->L2(1:B->L2(2:E->L2(3:End
If C=2:Then
A->L2(4:B->L2(5:E->L2(6:End
End
End
End
End



Edit:

I've updated the main Checkers file with all the revisions I've made via the test programs. It all seems to work happily together, so now I just need to figure out how to make it not break with the cursor issue.
Alright, I've fixed my issues with the cursor, so now it doesn't seem to break. Hooray!

Also, I've done this:



What do you think? Smile Good placement? The color of the number is going to change based on the color of the checker for the player.
Looks perfect, tifreak8x! Good compromise of player number and using the player color. I'd change the text to something like "Turn: Player X", just to make it abundantly clear what the player number is referring to. That's just me, though.
Alright, I'll make the modification afterwhile and post another screenshot Smile


The only things left are crowning and making it reset for a rematch. Should I worry about #2?

Crowning shouldn't be horrifically hard, I would think. Only problem is, this game is sitting at 5356 bytes in size. No idea how large crowning will cause this to go. I really need to see if I can downsize the overall game by combining some things..
Made some progress on this. Shaved off 156 bytes from the game by combining a few lines.

Also worked on the ability to king pieces. Realized I can't use Pt-On( to do what I need, will have to come up with some Line( commands to indicate kings.

I still need to see about getting it to move when a piece is kinged, as it was used the old setup, and that setup fails at life.

Hopefully I'll get this figured out tomorrow.
Sorry for letting you combo-post like that without any interruption. Smile
tifreak8x wrote:


The only things left are crowning and making it reset for a rematch. Should I worry about #2?

Crowning shouldn't be horrifically hard, I would think. Only problem is, this game is sitting at 5356 bytes in size. No idea how large crowning will cause this to go. I really need to see if I can downsize the overall game by combining some things..
The screenshot looks much better; thanks for taking my suggestion. I wouldn't worry terribly much about #2; why not just make the program close when it ends?
Well, I don't have any form of detection in place to determine if there is only the 1 checker left. And I don't think I'm going to bother adding that. But if 2 students want a rematch, it'd be a little easier if I had a temp pic var for such things to load from when they hit.. Say 'clear', and it just reset the variables and lists and such and redisplay the temp pic. After they close the game, the pic would be deleted.
Progress! I now have it set up so that when the red checkers hit the end of the board, it will mark it as kinged. Now I just need to make it so it will go back the other direction, and make that code work for player 2 as well. Very Happy
  
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 4 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