-
Notifications
You must be signed in to change notification settings - Fork 0
/
lround.89p
54 lines (49 loc) · 810 Bytes
/
lround.89p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
lround(n,p)
Prgm
Local ncards,i,j,temp,cards,inplay,t2
Disp "Dealing.."
0->ncards
For i,1,n
ncards+p[i]->ncards
EndFor
{}->inplay
For i,1,ncards
mod(det(randMat(2,2)),51)+1->r
games\inlist(r,inplay,i-1)
while listin=1
mod(det(randMat(2,2)),51)+1->r
games\inlist(r,inplay,i-1)
EndWhile
augment(inplay,{r})->inplay
EndFor
inplay->cards
For i,1,n
If p[i]>0 Then
ClrIO
Disp "Give to player "&string(i)
Disp "Player "&string(i)&", press enter"
Pause
ClrIO
Disp "Player "&string(i)&"'s hand:"
For j,1,p[i]
Disp ldeck[cards[j]]
EndFor
mid(cards,p[i]+1)->cards
Disp "Press enter"
Pause
EndIf
EndFor
ClrIO
Disp "Press enter after"
Disp "someone calls."
Pause
SortA inplay
ClrIO
For i,1,n
left(inplay,p[i])->temp
Disp string(i)&":"&string(games\lmap(temp,p[i]))
mid(inplay,p[i]+1)->inplay
EndFor
Pause
ClrIO
EndPrgm