In the initial commit to this project, you have been provided with files that contain a JavaScript module and some associated tests. Your task is to implement a validateLineup
function that will return true
if the lineup provided adheres to all of the rules listed below.
- The total salary of all players in a lineup may not exceed $45,000
- Lineups may not contain more than 2 players from a single team
- Lineups may not contain more than 3 players from a single game
- Lineups must contain exactly 3 players with the position of 'OF' and must also contain exactly 1 player from each of the following positions: 'P', 'C', '1B', '2B', '3B', 'SS'