March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
12
Task/Topswops/AutoHotkey/topswops-1.ahk
Normal file
12
Task/Topswops/AutoHotkey/topswops-1.ahk
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Topswops(Obj, n){
|
||||
R := []
|
||||
for i, val in obj{
|
||||
if (i <=n)
|
||||
res := val (A_Index=1?"":",") res
|
||||
else
|
||||
res .= "," val
|
||||
}
|
||||
Loop, Parse, res, `,
|
||||
R[A_Index]:= A_LoopField
|
||||
return R
|
||||
}
|
||||
14
Task/Topswops/AutoHotkey/topswops-2.ahk
Normal file
14
Task/Topswops/AutoHotkey/topswops-2.ahk
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Cards := [2, 4, 1, 3]
|
||||
Res := Print(Cards)
|
||||
while (Cards[1]<>1)
|
||||
{
|
||||
Cards := Topswops(Cards, Cards[1])
|
||||
Res .= "`n"Print(Cards)
|
||||
}
|
||||
MsgBox % Res
|
||||
|
||||
Print(M){
|
||||
for i, val in M
|
||||
Res .= (A_Index=1?"":"`t") val
|
||||
return Trim(Res,"`n")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue