So I want to make this game based on this game
Code:
What I want to do is create a game where the user says how many dices they want and the calc displays them in a triangular number sequence, like this:
28
21 27
15 20 16
10 14 19 25
6 9 13 18
3 5 8 12 17
1 2 4 7 11 16
The whole point of this is allowing the user to choose how many dices they want and this is the way I found to display them.
Problem is, everything.
I calculated the sequences rules for the sequences I wrote above, both vertical and horizontal sequences.
I was thinking about having the lists/sequences calculated and then finding the user input in the lists and save the number of the vertical list it was found in as X and the horizontal list as Y.
I just don't know how to calculate the lists.
Can someone help me write this program, please?
You can ignore the dots on the dices, I just the need to know how to calculate the lists, I think I can figure the rest by my own.
This all looks like… sequences inside of a bigger sequence or something. I don't know. I've been trying to finish this program for months and I'm very confused.
I forgot to say, the value X and Y are so the display goes like this:
Line(18x-14, 18Y-14,18x-14,18Y)
Line(etc…
Code:
:ClrDraw
:FnOff
:AxesOff
:0→Xmin
:0→Ymin
:94→Xmax
:62→Ymax
:For(I,4,76,18)
:Line(I,21,I,35)
:Line(I,21,I+14,21)
:Line(I,35,I+14,35)
:Line(I+14,21,I+14,35)
:End
:randInt(1,6,5)→L₁
:0→K
:While K ≠ 45
getkey→K
:For(I,1,5)
:18I-7→X
:If fPart(L₁(I)/2)=.5
:Pt-On(X,28,2)
:If L₁(I)≠1:Then
:Pt-On(X-4,32,2)
:Pt-On(X+4,24,2)
:End
:If L₁(I)>3:Then
:Pt-On(X-4,24,2)
:Pt-On(X+4,32,2)
:End
:If L₁(I)=6:Then
:Pt-On(X-4,28,2)
:Pt-On(X+4,28,2)
:End
:End
:End
:ClrDraw
:AxesOn
:ZStandard
:Output(1,1,"
What I want to do is create a game where the user says how many dices they want and the calc displays them in a triangular number sequence, like this:
28
21 27
15 20 16
10 14 19 25
6 9 13 18
3 5 8 12 17
1 2 4 7 11 16
The whole point of this is allowing the user to choose how many dices they want and this is the way I found to display them.
Problem is, everything.
I calculated the sequences rules for the sequences I wrote above, both vertical and horizontal sequences.
I was thinking about having the lists/sequences calculated and then finding the user input in the lists and save the number of the vertical list it was found in as X and the horizontal list as Y.
I just don't know how to calculate the lists.
Can someone help me write this program, please?
You can ignore the dots on the dices, I just the need to know how to calculate the lists, I think I can figure the rest by my own.
This all looks like… sequences inside of a bigger sequence or something. I don't know. I've been trying to finish this program for months and I'm very confused.
I forgot to say, the value X and Y are so the display goes like this:
Line(18x-14, 18Y-14,18x-14,18Y)
Line(etc…