@@ -5,47 +5,47 @@ public static class Formula1
5
5
private static List < Racer > ? s_racers ;
6
6
public static IList < Racer > GetChampions ( ) => s_racers ??= InitializeRacers ( ) ;
7
7
8
- private static List < Racer > InitializeRacers ( ) => new ( )
9
- {
10
- new ( "Nino" , "Farina" , "Italy" , 33 , 5 , new [ ] { 1950 } , new [ ] { "Alfa Romeo" } ) ,
11
- new ( "Alberto" , "Ascari" , "Italy" , 32 , 13 , new [ ] { 1952 , 1953 } , new [ ] { "Ferrari" } ) ,
12
- new ( "Juan Manuel" , "Fangio" , "Argentina" , 51 , 24 , new int [ ] { 1951 , 1954 , 1955 , 1956 , 1957 } , new string [ ] { "Alfa Romeo" , "Maserati" , "Mercedes" , "Ferrari" } ) ,
13
- new ( "Mike" , "Hawthorn" , "UK" , 45 , 3 , new int [ ] { 1958 } , new string [ ] { "Ferrari" } ) ,
14
- new ( "Phil" , "Hill" , "USA" , 48 , 3 , new int [ ] { 1961 } , new string [ ] { "Ferrari" } ) ,
15
- new ( "John" , "Surtees" , "UK" , 111 , 6 , new int [ ] { 1964 } , new string [ ] { "Ferrari" } ) ,
16
- new ( "Jim" , "Clark" , "UK" , 72 , 25 , new int [ ] { 1963 , 1965 } , new string [ ] { "Lotus" } ) ,
17
- new ( "Jack" , "Brabham" , "Australia" , 125 , 14 , new int [ ] { 1959 , 1960 , 1966 } , new string [ ] { "Cooper" , "Brabham" } ) ,
18
- new ( "Denny" , "Hulme" , "New Zealand" , 112 , 8 , new int [ ] { 1967 } , new string [ ] { "Brabham" } ) ,
19
- new ( "Graham" , "Hill" , "UK" , 176 , 14 , new int [ ] { 1962 , 1968 } , new string [ ] { "BRM" , "Lotus" } ) ,
20
- new ( "Jochen" , "Rindt" , "Austria" , 60 , 6 , new int [ ] { 1970 } , new string [ ] { "Lotus" } ) ,
21
- new ( "Jackie" , "Stewart" , "UK" , 99 , 27 , new int [ ] { 1969 , 1971 , 1973 } , new string [ ] { "Matra" , "Tyrrell" } ) ,
22
- new ( "Emerson" , "Fittipaldi" , "Brazil" , 144 , 14 , new int [ ] { 1972 , 1974 } , new string [ ] { "Lotus" , "McLaren" } ) ,
23
- new ( "James" , "Hunt" , "UK" , 92 , 10 , new int [ ] { 1976 } , new string [ ] { "McLaren" } ) ,
24
- new ( "Mario" , "Andretti" , "USA" , 128 , 12 , new int [ ] { 1978 } , new string [ ] { "Lotus" } ) ,
25
- new ( "Jody" , "Scheckter" , "South Africa" , 112 , 10 , new int [ ] { 1979 } , new string [ ] { "Ferrari" } ) ,
26
- new ( "Alan" , "Jones" , "Australia" , 116 , 12 , new int [ ] { 1980 } , new string [ ] { "Williams" } ) ,
27
- new ( "Keke" , "Rosberg" , "Finland" , 114 , 5 , new int [ ] { 1982 } , new string [ ] { "Williams" } ) ,
28
- new ( "Niki" , "Lauda" , "Austria" , 171 , 25 , new int [ ] { 1975 , 1977 , 1984 } , new string [ ] { "Ferrari" , "McLaren" } ) ,
29
- new ( "Nelson" , "Piquet" , "Brazil" , 204 , 23 , new int [ ] { 1981 , 1983 , 1987 } , new string [ ] { "Brabham" , "Williams" } ) ,
30
- new ( "Ayrton" , "Senna" , "Brazil" , 161 , 41 , new int [ ] { 1988 , 1990 , 1991 } , new string [ ] { "McLaren" } ) ,
31
- new ( "Nigel" , "Mansell" , "UK" , 187 , 31 , new int [ ] { 1992 } , new string [ ] { "Williams" } ) ,
32
- new ( "Alain" , "Prost" , "France" , 199 , 51 , new int [ ] { 1985 , 1986 , 1989 , 1993 } , new string [ ] { "McLaren" , "Williams" } ) ,
33
- new ( "Damon" , "Hill" , "UK" , 115 , 22 , new int [ ] { 1996 } , new string [ ] { "Williams" } ) ,
34
- new ( "Jacques" , "Villeneuve" , "Canada" , 163 , 11 , new int [ ] { 1997 } , new string [ ] { "Williams" } ) ,
35
- new ( "Mika" , "Hakkinen" , "Finland" , 161 , 20 , new int [ ] { 1998 , 1999 } , new string [ ] { "McLaren" } ) ,
36
- new ( "Michael" , "Schumacher" , "Germany" , 306 , 91 , new int [ ] { 1994 , 1995 , 2000 , 2001 , 2002 , 2003 , 2004 } , new string [ ] { "Benetton" , "Ferrari" } ) ,
37
- new ( "Fernando" , "Alonso" , "Spain" , 370 , 32 , new int [ ] { 2005 , 2006 } , new string [ ] { "Renault" } ) ,
38
- new ( "Kimi" , "Räikkönen" , "Finland" , 349 , 21 , new int [ ] { 2007 } , new string [ ] { "Ferrari" } ) ,
39
- new ( "Jenson" , "Button" , "UK" , 306 , 16 , new int [ ] { 2009 } , new string [ ] { "Brawn GP" } ) ,
40
- new ( "Sebastian" , "Vettel" , "Germany" , 299 , 53 , new int [ ] { 2010 , 2011 , 2012 , 2013 } , new string [ ] { "Red Bull Racing" } ) ,
41
- new ( "Nico" , "Rosberg" , "Germany" , 206 , 24 , new int [ ] { 2016 } , new string [ ] { "Mercedes" } ) ,
42
- new ( "Lewis" , "Hamilton" , "UK" , 322 , 103 , new int [ ] { 2008 , 2014 , 2015 , 2017 , 2018 , 2019 , 2020 } , new string [ ] { "McLaren" , "Mercedes" } ) ,
43
- new ( "Max" , "Verstappen" , "Netherlands" , 175 , 45 , new int [ ] { 2021 , 2022 } , new string [ ] { "Red Bull Racing" } )
44
- } ;
8
+ private static List < Racer > InitializeRacers ( ) =>
9
+ [
10
+ new ( "Nino" , "Farina" , "Italy" , 33 , 5 , [ 1950 ] , [ "Alfa Romeo" ] ) ,
11
+ new ( "Alberto" , "Ascari" , "Italy" , 32 , 13 , [ 1952 , 1953 ] , [ "Ferrari" ] ) ,
12
+ new ( "Juan Manuel" , "Fangio" , "Argentina" , 51 , 24 , [ 1951 , 1954 , 1955 , 1956 , 1957 ] , [ "Alfa Romeo" , "Maserati" , "Mercedes" , "Ferrari" ] ) ,
13
+ new ( "Mike" , "Hawthorn" , "UK" , 45 , 3 , [ 1958 ] , [ "Ferrari" ] ) ,
14
+ new ( "Phil" , "Hill" , "USA" , 48 , 3 , [ 1961 ] , [ "Ferrari" ] ) ,
15
+ new ( "John" , "Surtees" , "UK" , 111 , 6 , [ 1964 ] , [ "Ferrari" ] ) ,
16
+ new ( "Jim" , "Clark" , "UK" , 72 , 25 , [ 1963 , 1965 ] , [ "Lotus" ] ) ,
17
+ new ( "Jack" , "Brabham" , "Australia" , 125 , 14 , [ 1959 , 1960 , 1966 ] , [ "Cooper" , "Brabham" ] ) ,
18
+ new ( "Denny" , "Hulme" , "New Zealand" , 112 , 8 , [ 1967 ] , [ "Brabham" ] ) ,
19
+ new ( "Graham" , "Hill" , "UK" , 176 , 14 , [ 1962 , 1968 ] , [ "BRM" , "Lotus" ] ) ,
20
+ new ( "Jochen" , "Rindt" , "Austria" , 60 , 6 , [ 1970 ] , [ "Lotus" ] ) ,
21
+ new ( "Jackie" , "Stewart" , "UK" , 99 , 27 , [ 1969 , 1971 , 1973 ] , [ "Matra" , "Tyrrell" ] ) ,
22
+ new ( "Emerson" , "Fittipaldi" , "Brazil" , 144 , 14 , [ 1972 , 1974 ] , [ "Lotus" , "McLaren" ] ) ,
23
+ new ( "James" , "Hunt" , "UK" , 92 , 10 , [ 1976 ] , [ "McLaren" ] ) ,
24
+ new ( "Mario" , "Andretti" , "USA" , 128 , 12 , [ 1978 ] , [ "Lotus" ] ) ,
25
+ new ( "Jody" , "Scheckter" , "South Africa" , 112 , 10 , [ 1979 ] , [ "Ferrari" ] ) ,
26
+ new ( "Alan" , "Jones" , "Australia" , 116 , 12 , [ 1980 ] , [ "Williams" ] ) ,
27
+ new ( "Keke" , "Rosberg" , "Finland" , 114 , 5 , [ 1982 ] , [ "Williams" ] ) ,
28
+ new ( "Niki" , "Lauda" , "Austria" , 171 , 25 , [ 1975 , 1977 , 1984 ] , [ "Ferrari" , "McLaren" ] ) ,
29
+ new ( "Nelson" , "Piquet" , "Brazil" , 204 , 23 , [ 1981 , 1983 , 1987 ] , [ "Brabham" , "Williams" ] ) ,
30
+ new ( "Ayrton" , "Senna" , "Brazil" , 161 , 41 , [ 1988 , 1990 , 1991 ] , [ "McLaren" ] ) ,
31
+ new ( "Nigel" , "Mansell" , "UK" , 187 , 31 , [ 1992 ] , [ "Williams" ] ) ,
32
+ new ( "Alain" , "Prost" , "France" , 199 , 51 , [ 1985 , 1986 , 1989 , 1993 ] , [ "McLaren" , "Williams" ] ) ,
33
+ new ( "Damon" , "Hill" , "UK" , 115 , 22 , [ 1996 ] , [ "Williams" ] ) ,
34
+ new ( "Jacques" , "Villeneuve" , "Canada" , 163 , 11 , [ 1997 ] , [ "Williams" ] ) ,
35
+ new ( "Mika" , "Hakkinen" , "Finland" , 161 , 20 , [ 1998 , 1999 ] , [ "McLaren" ] ) ,
36
+ new ( "Michael" , "Schumacher" , "Germany" , 306 , 91 , [ 1994 , 1995 , 2000 , 2001 , 2002 , 2003 , 2004 ] , [ "Benetton" , "Ferrari" ] ) ,
37
+ new ( "Fernando" , "Alonso" , "Spain" , 404 , 32 , [ 2005 , 2006 ] , [ "Renault" ] ) ,
38
+ new ( "Kimi" , "Räikkönen" , "Finland" , 349 , 21 , [ 2007 ] , [ "Ferrari" ] ) ,
39
+ new ( "Jenson" , "Button" , "UK" , 306 , 16 , [ 2009 ] , [ "Brawn GP" ] ) ,
40
+ new ( "Sebastian" , "Vettel" , "Germany" , 299 , 53 , [ 2010 , 2011 , 2012 , 2013 ] , [ "Red Bull Racing" ] ) ,
41
+ new ( "Nico" , "Rosberg" , "Germany" , 206 , 24 , [ 2016 ] , [ "Mercedes" ] ) ,
42
+ new ( "Lewis" , "Hamilton" , "UK" , 335 , 105 , [ 2008 , 2014 , 2015 , 2017 , 2018 , 2019 , 2020 ] , [ "McLaren" , "Mercedes" ] ) ,
43
+ new ( "Max" , "Verstappen" , "Netherlands" , 209 , 63 , [ 2021 , 2022 , 2023 , 2024 ] , [ "Red Bull Racing" ] )
44
+ ] ;
45
45
46
46
private static List < Team > ? s_teams ;
47
- public static IList < Team > GetConstructorChampions ( ) => s_teams ??= new ( )
48
- {
47
+ public static IList < Team > GetConstructorChampions ( ) => s_teams ??=
48
+ [
49
49
new ( "Vanwall" , 1958 ) ,
50
50
new ( "Cooper" , 1959 , 1960 ) ,
51
51
new ( "BRM" , 1962 ) ,
@@ -55,17 +55,17 @@ public static class Formula1
55
55
new ( "Lotus" , 1963 , 1965 , 1968 , 1970 , 1972 , 1973 , 1978 ) ,
56
56
new ( "Benetton" , 1995 ) ,
57
57
new ( "Williams" , 1980 , 1981 , 1986 , 1987 , 1992 , 1993 , 1994 , 1996 , 1997 ) ,
58
- new ( "McLaren" , 1974 , 1984 , 1985 , 1988 , 1989 , 1990 , 1991 , 1998 ) ,
58
+ new ( "McLaren" , 1974 , 1984 , 1985 , 1988 , 1989 , 1990 , 1991 , 1998 , 2024 ) ,
59
59
new ( "Renault" , 2005 , 2006 ) ,
60
60
new ( "Ferrari" , 1961 , 1964 , 1975 , 1976 , 1977 , 1979 , 1982 , 1983 , 1999 , 2000 , 2001 , 2002 , 2003 , 2004 , 2007 , 2008 ) ,
61
61
new ( "Brawn GP" , 2009 ) ,
62
- new ( "Red Bull Racing" , 2010 , 2011 , 2012 , 2013 , 2022 ) ,
62
+ new ( "Red Bull Racing" , 2010 , 2011 , 2012 , 2013 , 2022 , 2023 ) ,
63
63
new ( "Mercedes" , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 )
64
- } ;
64
+ ] ;
65
65
66
66
private static List < Championship > ? s_championships ;
67
- public static IEnumerable < Championship > GetChampionships ( ) => s_championships ??= new ( )
68
- {
67
+ public static IEnumerable < Championship > GetChampionships ( ) => s_championships ??=
68
+ [
69
69
new ( 1950 , "Nino Farina" , "Juan Manuel Fangio" , "Luigi Fagioli" ) ,
70
70
new ( 1951 , "Juan Manuel Fangio" , "Alberto Ascari" , "Froilan Gonzalez" ) ,
71
71
new ( 1952 , "Alberto Ascari" , "Nino Farina" , "Piero Taruffi" ) ,
@@ -139,11 +139,13 @@ public static class Formula1
139
139
new ( 2020 , "Lewis Hamilton" , "Valtteri Bottas" , "Max Verstappen" ) ,
140
140
new ( 2021 , "Max Verstappen" , "Lewis Hamilton" , "Valtteri Bottas" ) ,
141
141
new ( 2022 , "Max Verstappen" , "Charles Leclerc" , "Sergio Perez" ) ,
142
- } ;
142
+ new Championship ( 2023 , "Max Verstappen" , "Sergio Perez" , "Lewis Hamilton" ) ,
143
+ new Championship ( 2024 , "Max Verstappen" , "Lando Norris" , "Charles Leclerc" )
144
+ ] ;
143
145
144
146
private static List < Racer > ? s_moreRacers ;
145
- public static IList < Racer > GetMoreRacers ( ) => s_moreRacers ??= new ( )
146
- {
147
+ public static IList < Racer > GetMoreRacers ( ) => s_moreRacers ??=
148
+ [
147
149
new Racer ( "Luigi" , "Fagioli" , "Italy" , Starts : 7 , Wins : 1 ) ,
148
150
new Racer ( "Jose Froilan" , "Gonzalez" , "Argentina" , 26 , 2 ) ,
149
151
new Racer ( "Piero" , "Taruffi" , "Italy" , Starts : 18 , Wins : 1 ) ,
@@ -175,9 +177,10 @@ public static class Formula1
175
177
new Racer ( "Juan Pablo" , "Montoya" , "Columbia" , Starts : 94 , Wins : 7 ) ,
176
178
new Racer ( "Felipe" , "Massa" , "Brazil" , Starts : 269 , Wins : 11 ) ,
177
179
new Racer ( "Mark" , "Webber" , "Australia" , Starts : 215 , Wins : 9 ) ,
178
- new Racer ( "Daniel" , "Ricciardo" , "Australia" , Starts : 234 , Wins : 8 ) ,
179
- new Racer ( "Valtteri" , "Bottas" , "Finland" , Starts : 212 , Wins : 10 ) ,
180
- new Racer ( "Charles" , "Leclerc" , "Monaco" , Starts : 115 , Wins : 5 ) ,
181
- new Racer ( "Sergio" , "Perez" , "Mexico" , Starts : 248 , Wins : 6 ) ,
182
- } ;
183
- }
180
+ new Racer ( "Daniel" , "Ricciardo" , "Australia" , Starts : 257 , Wins : 8 ) ,
181
+ new Racer ( "Valtteri" , "Bottas" , "Finland" , Starts : 246 , Wins : 10 ) ,
182
+ new Racer ( "Charles" , "Leclerc" , "Monaco" , Starts : 149 , Wins : 8 ) ,
183
+ new Racer ( "Sergio" , "Perez" , "Mexico" , Starts : 282 , Wins : 6 ) ,
184
+ new Racer ( "Lando" , "Norris" , "UK" , Starts : 128 , Wins : 4 )
185
+ ] ;
186
+ }
0 commit comments