File tree Expand file tree Collapse file tree
exercises/concept/last-will Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Secret knowledge of the Zhang family:
22class Zhang
3+
34 def self . bank_number_part ( secret_modifier )
45 zhang_part = 8_541
5- ( zhang_part * secret_modifier ) % 10_000
6+ zhang_part * secret_modifier % 10_000
67 end
78
89 class Red
10+
911 def self . code_fragment
1012 512
1113 end
14+
1215 end
1316
1417 class Blue
18+
1519 def self . code_fragment
1620 677
1721 end
22+
1823 end
24+
1925end
2026
2127# Secret knowledge of the Khan family:
2228class Khan
29+
2330 def self . bank_number_part ( secret_modifier )
2431 khan_part = 4_142
25- ( khan_part * secret_modifier ) % 10_000
32+ khan_part * secret_modifier % 10_000
2633 end
2734
2835 class Red
36+
2937 def self . code_fragment
3038 148
3139 end
40+
3241 end
3342
3443 class Blue
44+
3545 def self . code_fragment
3646 875
3747 end
48+
3849 end
50+
3951end
4052
4153# Secret knowledge of the Garcia family:
4254class Garcia
55+
4356 def self . bank_number_part ( secret_modifier )
4457 garcia_part = 4_023
45- ( garcia_part * secret_modifier ) % 10_000
58+ garcia_part * secret_modifier % 10_000
4659 end
4760
4861 class Red
62+
4963 def self . code_fragment
5064 118
5165 end
66+
5267 end
5368
5469 class Blue
70+
5571 def self . code_fragment
5672 923
5773 end
74+
5875 end
76+
5977end
6078
6179class EstateExecutor
Original file line number Diff line number Diff line change 22
33# Secret knowledge of the Zhang family:
44class Zhang
5+
56 def self . bank_number_part ( secret_modifier )
67 zhang_part = 8_541
7- ( zhang_part * secret_modifier ) % 10_000
8+ zhang_part * secret_modifier % 10_000
89 end
910
1011 class Red
12+
1113 def self . code_fragment
1214 512
1315 end
16+
1417 end
1518
1619 class Blue
20+
1721 def self . code_fragment
1822 677
1923 end
24+
2025 end
26+
2127end
2228
2329# Secret knowledge of the Khan family:
2430class Khan
31+
2532 def self . bank_number_part ( secret_modifier )
2633 khan_part = 4_142
27- ( khan_part * secret_modifier ) % 10_000
34+ khan_part * secret_modifier % 10_000
2835 end
2936
3037 class Red
38+
3139 def self . code_fragment
3240 148
3341 end
42+
3443 end
3544
3645 class Blue
46+
3747 def self . code_fragment
3848 875
3949 end
50+
4051 end
52+
4153end
4254
4355# Secret knowledge of the Garcia family:
4456class Garcia
57+
4558 def self . bank_number_part ( secret_modifier )
4659 garcia_part = 4_023
47- ( garcia_part * secret_modifier ) % 10_000
60+ garcia_part * secret_modifier % 10_000
4861 end
4962
5063 class Red
64+
5165 def self . code_fragment
5266 118
5367 end
68+
5469 end
5570
5671 class Blue
72+
5773 def self . code_fragment
5874 923
5975 end
76+
6077 end
78+
6179end
6280
6381# Enter your code below
You can’t perform that action at this time.
0 commit comments