diff --git a/02/b.py b/02/b.py index 2fbf7ee..8f6bcd1 100644 --- a/02/b.py +++ b/02/b.py @@ -17,9 +17,31 @@ for l in f: result = 'win' case 'Z': result = 'loss' + case 'B': + match choices[1]: + case 'X': + result = 'loss' + case 'Z': + result = 'win' + case 'C': + match choices[1]: + case 'X': + result = 'win' + case 'Y': + result = 'loss' + value = selection.get(choices[1]) + + match choices[1]: + case 'X': + tot = tot + 1 + case 'Y': + tot = tot + 2 + case 'Z': + tot = tot + 3 - tot = tot + selection.get(choices[1]) if result == 'draw': tot = tot + 3 if result == 'win': tot = tot + 6 + +print(tot)