Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileRead, Input, 2.txt
- ;1
- score := 0
- for i, round in StrSplit(Input, "`r`n`") {
- opp := asc(StrSplit(round, A_Space)[1]) - 96 + 32
- me := asc(StrSplit(round, A_Space)[2]) - 96 - 23 + 32
- s := (Mod(opp+3 - me+3, 3))
- if (s = 0)
- score += 3
- else if (s = 2)
- score += 6
- score += me
- }
- MsgBox, % score
- ;2
- score := 0
- for i, round in StrSplit(Input, "`r`n`") {
- opp := asc(StrSplit(round, A_Space)[1]) - 96 + 32 - 1
- res := asc(StrSplit(round, A_Space)[2]) - 96 - 23 + 32 - 2
- score += ((res+1) * 3) + (Mod(opp + res + 6, 3) + 1)
- }
- MsgBox, % score
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement