Hello everybody, I need your help due to a problem with the AUGMENT command: I am making a blackjack and I'm trying to create a working deck, so that when a card is extracted it can't extracted again.
This is the code:
52→dim(L₆
Fill(0,L₆
seq(X,X,0,51)→L₆
Disp L₆
5→C
51→dim(L₆
Fill(0,L₆
For(A,0,dim(L₆),1)
If A=C
Then
Wait 2
Else
Disp A
augment(L₆,{A})→L₆
SortA(L₆
Disp L₆
End
End
Disp L₆
The Disp that I've put are going to me removed it's just for me to check if the counter is going. The problem is that after the list is created and than filled with zero (the second fill), when I run the for loop it doesn't work. It should create a new list containing the previous list value exept the extracted one. Though that doesn't happen and it just stay filled with zeros.
If you know why your help would be grateful.
Thank you for your attention
This is the code:
52→dim(L₆
Fill(0,L₆
seq(X,X,0,51)→L₆
Disp L₆
5→C
51→dim(L₆
Fill(0,L₆
For(A,0,dim(L₆),1)
If A=C
Then
Wait 2
Else
Disp A
augment(L₆,{A})→L₆
SortA(L₆
Disp L₆
End
End
Disp L₆
The Disp that I've put are going to me removed it's just for me to check if the counter is going. The problem is that after the list is created and than filled with zero (the second fill), when I run the for loop it doesn't work. It should create a new list containing the previous list value exept the extracted one. Though that doesn't happen and it just stay filled with zeros.
If you know why your help would be grateful.
Thank you for your attention