Delphi & Pascal (česká wiki)
Procedure SetupSymboly(I: Byte); Begin If I=0 then Begin If Valec[I].SymbolCounter<=MaxSymbolu-4 then Begin Valec[I].Symbol[0]:=SymbolyA[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyA[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyA[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyA[Valec[I].SymbolCounter+3]; Valec[I].Symbol[4]:=SymbolyA[Valec[I].SymbolCounter+4]; End; If Valec[I].SymbolCounter=MaxSymbolu-3 then Begin Valec[I].Symbol[0]:=SymbolyA[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyA[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyA[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyA[Valec[I].SymbolCounter+3]; Valec[I].Symbol[4]:=SymbolyA[0]; End; If Valec[I].SymbolCounter=MaxSymbolu-2 then Begin Valec[I].Symbol[0]:=SymbolyA[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyA[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyA[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyA[0]; Valec[I].Symbol[4]:=SymbolyA[1]; End; If Valec[I].SymbolCounter=MaxSymbolu-1 then Begin Valec[I].Symbol[0]:=SymbolyA[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyA[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyA[0]; Valec[I].Symbol[3]:=SymbolyA[1]; Valec[I].Symbol[4]:=SymbolyA[2]; End; If Valec[I].SymbolCounter=MaxSymbolu then Begin Valec[I].Symbol[0]:=SymbolyA[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyA[0]; Valec[I].Symbol[2]:=SymbolyA[1]; Valec[I].Symbol[3]:=SymbolyA[2]; Valec[I].Symbol[4]:=SymbolyA[3]; End; End; If I=1 then Begin If Valec[I].SymbolCounter<=MaxSymbolu-4 then Begin Valec[I].Symbol[0]:=SymbolyB[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyB[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyB[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyB[Valec[I].SymbolCounter+3]; Valec[I].Symbol[4]:=SymbolyB[Valec[I].SymbolCounter+4]; End; If Valec[I].SymbolCounter=MaxSymbolu-3 then Begin Valec[I].Symbol[0]:=SymbolyB[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyB[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyB[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyB[Valec[I].SymbolCounter+3]; Valec[I].Symbol[4]:=SymbolyB[0]; End; If Valec[I].SymbolCounter=MaxSymbolu-2 then Begin Valec[I].Symbol[0]:=SymbolyB[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyB[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyB[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyB[0]; Valec[I].Symbol[4]:=SymbolyB[1]; End; If Valec[I].SymbolCounter=MaxSymbolu-1 then Begin Valec[I].Symbol[0]:=SymbolyB[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyB[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyB[0]; Valec[I].Symbol[3]:=SymbolyB[1]; Valec[I].Symbol[4]:=SymbolyB[2]; End; If Valec[I].SymbolCounter=MaxSymbolu then Begin Valec[I].Symbol[0]:=SymbolyB[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyB[0]; Valec[I].Symbol[2]:=SymbolyB[1]; Valec[I].Symbol[3]:=SymbolyB[2]; Valec[I].Symbol[4]:=SymbolyB[3]; End; End; If I=2 then Begin If Valec[I].SymbolCounter<=MaxSymbolu-4 then Begin Valec[I].Symbol[0]:=SymbolyC[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyC[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyC[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyC[Valec[I].SymbolCounter+3]; Valec[I].Symbol[4]:=SymbolyC[Valec[I].SymbolCounter+4]; End; If Valec[I].SymbolCounter=MaxSymbolu-3 then Begin Valec[I].Symbol[0]:=SymbolyC[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyC[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyC[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyC[Valec[I].SymbolCounter+3]; Valec[I].Symbol[4]:=SymbolyC[0]; End; If Valec[I].SymbolCounter=MaxSymbolu-2 then Begin Valec[I].Symbol[0]:=SymbolyC[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyC[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyC[Valec[I].SymbolCounter+2]; Valec[I].Symbol[3]:=SymbolyC[0]; Valec[I].Symbol[4]:=SymbolyC[1]; End; If Valec[I].SymbolCounter=MaxSymbolu-1 then Begin Valec[I].Symbol[0]:=SymbolyC[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyC[Valec[I].SymbolCounter+1]; Valec[I].Symbol[2]:=SymbolyC[0]; Valec[I].Symbol[3]:=SymbolyC[1]; Valec[I].Symbol[4]:=SymbolyC[2]; End; If Valec[I].SymbolCounter=MaxSymbolu then Begin Valec[I].Symbol[0]:=SymbolyC[Valec[I].SymbolCounter+0]; Valec[I].Symbol[1]:=SymbolyC[0]; Valec[I].Symbol[2]:=SymbolyC[1]; Valec[I].Symbol[3]:=SymbolyC[2]; Valec[I].Symbol[4]:=Symbolyc[3]; End; End; End; Procedure RollProc; Var I: Byte; Begin For I:=0 to 2 do Begin If Valec[I].Rotate=True then Begin If Valec[I].Counter>0 then Dec(Valec[I].Counter) else Begin Valec[I].Rotate:=False; If DatRec.SBEnable=True then SBPlayRaw(21+SoundValce) else PlaySound(11+SoundValce); Inc(SoundValce); End; If Valec[I].Scroll<23 then Inc(Valec[I].Scroll) else Valec[I].Scroll:=0; If Valec[I].Scroll=0 then Begin If Valec[I].SymbolCounter>0 then Dec(Valec[I].SymbolCounter) else Valec[I].SymbolCounter:=MaxSymbolu; SetupSymboly(I); End; End; If ((Valec[0].Rotate=False) and (Valec[1].Rotate=False) and (Valec[2].Rotate=False)) then AllStoped:=True; End; End;