Author Topic: AXECHESS - The First Chess made in Axe  (Read 23365 times)

0 Members and 3 Guests are viewing this topic.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: AXECHESS - The First Chess made in Axe
« Reply #45 on: November 10, 2012, 12:51:21 pm »
No that's not possible. I think this needs some explaination.


A WILD POINTER TUTORIAL APPEARS!

What {p*4+n+L1} actually means is a place in memory. {p*4+n+L1} points to that place and is thus called a pointer. L1 is not a list like in Basic, it is a pointer. What you do when saying {p*4+n+L1} is tell the program to go to p*4+n bytes after L1. This can even be done with "variables": I bet you have had these weird characters on your screen when you forgot to say >dec when you wanted to output a number on screen. These weird characters are actually the contents of RAM at the place of your number :).

If you got any more questions, ask!
« Last Edit: November 10, 2012, 12:53:03 pm by aeTIos »
I'm not a nerd but I pretend:

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #46 on: November 10, 2012, 12:58:50 pm »
so, put all the different numbers for one piece on separate lines, n = 1, first being p*1+n, then p*2+n, etc. then the next piece, n = 2? (plz give me a code example)...
I am Bach.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: AXECHESS - The First Chess made in Axe
« Reply #47 on: November 10, 2012, 01:09:40 pm »
Imagine you have the white H-pawn. This is likely to be the eighth piece in L1. (remember that because we start counting from zero, we have to subtract one from this. This explains why I'll use seven instead of eight in the exciting piece of code following this boring story)
It moves on the last row. Because you are still debugging, you haven't included that you cannot promote into a king.
Now if we want to change the pawn in a king, we do:
Code: [Select]
;remember, the king is represented by 5
;also remember that the piece type is the 3rd element of the 4 bytes per piece, the 0th being if it's taken or not.
5 -> { 7*4  + 3  + L1}   ;the p here is 7, the n is 3
I'm not a nerd but I pretend:

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #48 on: November 10, 2012, 02:06:05 pm »
Uh... aeTIos, when I compile I get a "duplicate symbol" exception for the pics

edit: here's my code (the error is when declaring pics)
Code: [Select]
.CHESS
[3844828282443800]üPic1PCS
[387CFEFEFE7C3800]üPic1PCS
[3068A4A484483000]üPic1PCS
[1058DCDCFC783000]üPic1PCS
[609088482848F800]üPic1PCS
[60F0F87838787800]üPic1PCS
[D6D67C2828287C00]üPic1PCS
[D6D67C3838387C00]üPic1PCS
[9254382828287C00]üPic1PCS
[9254383838387C00]üPic1PCS
[3828EE82EE283800]üPic1PCS
[3838FEFEFE383800]üPic1PCS
[FFFFFFFFFFFFFFFF]üPic3
19ü{Lƒ+17}
15ü{Lƒ+18}
20ü{0*4+0+L}
1ü{0*4+1+L}
27ü{1*4+0+L}
1ü{1*4+1+L}
34ü{2*4+0+L}
1ü{2*4+1+L}
41ü{3*4+0+L}
1ü{3*4+1+L}
48ü{4*4+0+L}
1ü{4*4+1+L}
55ü{5*4+0+L}
1ü{5*4+1+L}
62ü{6*4+0+L}
1ü{6*4+1+L}
69ü{7*4+0+L}
1ü{7*4+1+L}
20ü{8*4+0+L}
8ü{8*4+1+L}
27ü{9*4+0+L}
8ü{9*4+1+L}
34ü{10*4+0+L}
8ü{10*4+1+L}
41ü{11*4+0+L}
8ü{11*4+1+L}
48ü{12*4+0+L}
8ü{12*4+1+L}
55ü{13*4+0+L}
8ü{13*4+1+L}
62ü{14*4+0+L}
8ü{14*4+1+L}
69ü{15*4+0+L}
8ü{15*4+1+L}
50ü{16*4+1+L}ü{17*4+1+L}ü{18*4+1+L}ü{19*4+1+L}ü{20*4+1+L}ü{21*4+1+L}ü{22*4+1+L}ü{23*4+1+L}
20ü{16*4+0+L}
27ü{17*4+0+L}
34ü{18*4+0+L}
41ü{19*4+0+L}
48ü{20*4+0+L}
55ü{21*4+0+L}
62ü{22*4+0+L}
69ü{23*4+0+L}
43ü{24*4+1+L}ü{25*4+1+L}ü{26*4+1+L}ü{27*4+1+L}ü{28*4+1+L}ü{29*4+1+L}ü{30*4+1+L}ü{31*4+1+L}
20ü{24*4+0+L}
27ü{25*4+0+L}
34ü{26*4+0+L}
41ü{27*4+0+L}
48ü{28*4+0+L}
55ü{29*4+0+L}
62ü{30*4+0+L}
69ü{31*4+0+L}
0ü{24*4+3+L}ü{25*4+3+L}ü{26*4+3+L}ü{27*4+3+L}ü{28*4+3+L}ü{29*4+3+L}ü{30*4+3+L}ü{31*4+3+L}
1ü{8*4+3+L}ü{9*4+3+L}ü{10*4+3+L}ü{11*4+3+L}ü{12*4+3+L}ü{13*4+3+L}ü{14*4+3+L}ü{15*4+3+L}
2ü{2*4+3+L}ü{5*4+3+L}ü{18*4+3+L}ü{21*4+3+L}
3ü{1*4+3+L}ü{6*4+3+L}ü{17*4+3+L}ü{22*4+3+L}
4ü{0*4+3+L}ü{7*4+3+L}ü{16*4+3+L}ü{23*4+3+L}
5ü{3*4+3+L}ü{19*4+3+L}
6ü{4*4+3+L}ü{20*4+3+L}
Repeat (getKey(15))
sub(M)
If (0)
Lbl M
If ((getKey(3)) and ({Lƒ+17}<68))
{Lƒ+17}+7ü{Lƒ+17}
Pause 250
End
If ((getKey(2)) and ({Lƒ+17}>20))
{Lƒ+17}-7ü{Lƒ+17}
Pause 250
End
If ((getKey(4)) and ({Lƒ+18}>1))
{Lƒ+18}-7ü{Lƒ+18}
Pause 250
End
If ((getKey(1)) and ({Lƒ+18}<48))
{Lƒ+18}+7ü{Lƒ+18}
Pause 250
End
Return
End
If (getKey(54))
For(N,0,31)
If (({N*4+0+L}=({Lƒ+17}+1)) and ({N*4+1+L}={Lƒ+18}) and ({N*4+3+L}=0))
{N*4+0+L}üZ
{N*4+1+L}üÁ
sub(A)
Zü{N*4+0+L}
Áü{N*4+1+L}
End
End
End
sub(O)
If (0)
Lbl O
ClrDraw
Line(19,1,19,57)
Line(26,1,26,57)
Line(33,1,33,57)
Line(40,1,40,57)
Line(47,1,47,57)
Line(54,1,54,57)
Line(61,1,61,57)
Line(68,1,68,57)
Line(75,1,75,57)
Line(19,1,75,1)
Line(19,8,75,8)
Line(19,15,75,15)
Line(19,22,75,22)
Line(19,29,75,29)
Line(19,36,75,36)
Line(19,43,75,43)
Line(19,50,75,50)
Line(19,57,75,57)
For(A,0,31)
If ({A*4+L1}=!0)
A>15üB
Pt-On({A*4+L1+1?r1},{r1+1},B*6+{r1+2}*8+Pic1PCS)
End
End
DispGraph
Return
End
End
If (0)
Lbl A
Repeat (getKey(55))
sub(M)
If ((getKey(54)) and (((Á)-14)={Lƒ+18}) and ((Y)<1))
Á-14üÁ
1üY
End
If ((getKey(54)) and ((Á-7)={Lƒ+18}) and ((Z-1)={Lƒ+17}))
Á-7üÁ
1üY
End
If ((getKey(54)) and ((Á-7)={Lƒ+18}) and ((Z-7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L+X})) and (({Lƒ+18})=({L‚+X})))
0ü{L+X}
0ü{L‚+X}
Á-7üÁ
Z-7üZ
1üY
End
End
End
If ((getKey(54)) and ((Á-7)={Lƒ+18}) and ((Z+7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L+X})) and (({Lƒ+18})=({L‚+X})))
0ü{L+X}
0ü{L‚+X}
Á-7üÁ
Z+7üZ
1üY
End
End
End
sub(O)
End
Return
End
If (0)
Lbl B
Repeat (getKey(55))
sub(M)
If ((getKey(54)) and (((Á)+14)={Lƒ+18}) and ((Y)<1))
Á+14üÁ
1üY
End
If ((getKey(54)) and ((Á+7)={Lƒ+18}) and ((Z-1)={Lƒ+17}))
Á+7üÁ
1üY
End
If ((getKey(54)) and ((Á+7)={Lƒ+18}) and ((Z-7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L„+X})) and (({Lƒ+18})=({L…+X})))
0ü{L„+X}
0ü{L…+X}
Á+7üÁ
Z-7üZ
1üY
End
End
End
If ((getKey(54)) and ((Á+7)={Lƒ+18}) and ((Z+7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L„+X})) and (({Lƒ+18})=({L…+X})))
0ü{L„+X}
0ü{L…+X}
Á+7üÁ
0Z+7üZ
1üY
End
End
End
sub(O)
End
Return
End
If (0)
Lbl C
Repeat (getKey(55))
sub(M)
If (getKey(54))
For(V,1,50)
If (((Z+V)=({Lƒ+17}+1)) and ((Á+V)=({Lƒ+18}))
Z+VüZ
Á+VüÁ
End
If (((Z-V)=({Lƒ+17}+1)) and ((Á+V)={Lƒ+18}))
Z-VüZ
V+ÁüÁ
End
If (((Z+V)=({Lƒ+17}+1)) and ((Á-V)={Lƒ+18}))
Z+VüZ
Á-VüÁ
End
If (((Z-V)=({Lƒ+17}+1)) and ((Á-V)={Lƒ+18}))
Z-VüZ
Á-VüÁ
End
If (getKey(54))
For(X,1,16)
If ((({Lƒ+17}+1)={L+X}) and ({Lƒ+18}={L‚+X}))
0ü{L+X}
0ü{L‚+X}
End
End
End
If (getKey(54))
For(X,1,16)
If ((({Lƒ+17}+1)={L„+X}) and ({L…+X}={Lƒ+18}))
0ü{L„+X}
0ü{L…+X}
End
End
End
End
End
sub(O)
End
Return
End
If (0)
Lbl D
Repeat (getKey(55))
sub(M)
If (getKey(54))
For(V,1,49)
If ((Z=({Lƒ+17}+1) and ({Lƒ+18}=(Á+V)))
Á+VüÁ
End
If ((Z=({Lƒ+17}+1) and ({Lƒ+18}=(Á-V)))
Á-VüÁ
End
If (((Z+V)=({Lƒ+17}+1) and ({Lƒ+18}=Á))
Z+VüZ
End
If (((Z-V)=({Lƒ+17}+1) and ({Lƒ+18}=Á))
Z-VüZ
End
End
If (getKey(54))
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
End
sub(O)
End
Return
End
If (0)
Lbl E
Repeat (getKey(55))
sub(M)
If (getKey(54))
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á+14)))
Z+7üZ
Á+14üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á+14)))
Z-7üZ
Á+14üÁ
End
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á-14)))
Z+7üZ
Á-14üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á-14)))
Z-7üZ
Á-14üÁ
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=(Á+7)))
Z+14üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=(Á+7)))
Z-14üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=(Á-7)))
Z+14üZ
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=(Á-7)))
Z-14üZ
Á-7üÁ
End
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
sub(O)
End
Return
End
If (0)
Lbl F
Repeat (getKey(55))
sub(M)
If (getKey(54))
For(X,1,49)
If ((({Lƒ+17}+1)=(Z+X)) and ({Lƒ+18}=(Á+X)))
Z+XüZ
Á+XüÁ
End
If ((({Lƒ+17}+1)=(Z-X)) and ({Lƒ+18}=(Á+X)))
Z-XüZ
Á+XüÁ
End
If ((({Lƒ+17}+1)=(Z+X)) and ({Lƒ+18}=(Á-X)))
Z+XüZ
Á-XüÁ
End
If ((({Lƒ+17}+1)=(Z-X)) and ({Lƒ+18}=(Á-X)))
Z-XüZ
Á-XüÁ
End
If ((({Lƒ+17}+1)=(Z+X)) and ({Lƒ+18}=(Á)))
Z+XüZ
End
If ((({Lƒ+17}+1)=(Z-X)) and ({Lƒ+18}=(Á)))
Z-XüZ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á+X)))
Á+XüÁ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á-X)))
Á-XüÁ
End
End
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
sub(O)
End
Return
End
If (0)
Lbl G
Repeat (getKey(55))
sub(M)
If (getKey(54))
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á+7)))
Z+7üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á+7)))
Z-7üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á-7)))
Z+7üZ
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á-7)))
Z-7üZ
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á)))
Z+7üZ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á)))
Z-7üZ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á+7)))
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á-7)))
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=Á) and (Á={L…+8}))
Z+14üZ
{L„+8}-14ü{L„+8}
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=Á) and (Á={L‚+8}))
Z+14üZ
{L+8}-14ü{L+8}
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=Á) and (Á={L‚+1}))
Z-14üZ
{L+1}+21ü{L+1}
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=Á) and (Á={L…+1}))
Z-14üZ
{L„+1}+21ü{L„+1}
End
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
sub(O)
End
Return
End
If (0)
Lbl P

Return
End
« Last Edit: November 10, 2012, 02:14:40 pm by pimathbrainiac »
I am Bach.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: AXECHESS - The First Chess made in Axe
« Reply #49 on: November 10, 2012, 02:16:13 pm »
You don't need to declare Pic1PCS every time. only the first time is sufficient :)
I'm not a nerd but I pretend:

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #50 on: November 10, 2012, 02:17:01 pm »
but how do I declare all the other pics?
I am Bach.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: AXECHESS - The First Chess made in Axe
« Reply #51 on: November 10, 2012, 02:17:22 pm »
You don't need that. :D
I'm not a nerd but I pretend:

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #52 on: November 19, 2012, 03:25:45 pm »
Well, I'm taking a break from this project for a little bit. I hope it will continue :-)
I am Bach.

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #53 on: November 24, 2012, 01:21:06 pm »
NEWS! Promotion WORKING!!!!!!!!!!! Will post file as soon as I bugfix.

edit: IT WORKS!

Screenie:


Promotion Screenie:


THANK YOU aeTIos FOR ALL YOUR HELP!
« Last Edit: November 24, 2012, 09:32:09 pm by pimathbrainiac »
I am Bach.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: AXECHESS - The First Chess made in Axe
« Reply #54 on: November 24, 2012, 09:56:37 pm »
I didn't know promotion existed in Chess O.O.

Nice to see new updates, though. Also it looks quite nice. :)

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #55 on: November 24, 2012, 09:58:36 pm »
And now... the files!
I am Bach.

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #56 on: November 28, 2012, 02:33:30 pm »
Up Next: AI
I am Bach.

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #57 on: December 03, 2012, 02:50:45 pm »
* pimathbrainiac shamelessly bumps
* pimathbrainiac also asks the following questions:

Should I add linking before AI?

Or should I not add linking?
« Last Edit: December 03, 2012, 02:51:59 pm by pimathbrainiac »
I am Bach.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #58 on: December 03, 2012, 04:02:52 pm »
What's linking?

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: AXECHESS - The First Chess made in Axe
« Reply #59 on: December 03, 2012, 04:04:03 pm »
linking between calcs...
I am Bach.