Skip to content

turingschool-examples/futbol-weekend-push-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Futbol V2 - The Weekend Push

Setup

  • One person, fork this repo and add teammates as collaborators
    • everyone clone that fork
  • Set up the Spec Harness
    • pay attention to the file structure in these setup instructions!

Iteration 1: Friday

As a group:

  1. Make the existing tests pass.
  • there are 3 failing tests
  • do not change the tests
  1. Annotate the existing code in stat_tracker
  • comment above each line what that line is doing
  • use technical jargon; ex: "The string "hello world" is being assigned to the variable greeting", "Iterate over the attribute @vehicles which is an array of Vehicle objects, to find those that are Toyotas"

Iteration 2: Saturday & Sunday

Complete the following methods. These should be instance methods on the StatTracker class. Be sure to test these, and other helper methods that you create!

  • You could compolete these as a group, or split them up.
  • You will need to update classes and tests that were provided.
  • make sure to run the spec harness early and often! (not all of the tests in spec harness will be covered by the methods below).

Game Statistics

Method Description Return Value
highest_total_score Highest sum of the winning and losing teams' scores Integer
lowest_total_score Lowest sum of the winning and losing teams' scores Integer
percentage_home_wins Percentage of games that a home team has won (rounded to the nearest 100th) Float
percentage_visitor_wins Percentage of games that a visitor has won (rounded to the nearest 100th) Float
percentage_ties Percentage of games that has resulted in a tie (rounded to the nearest 100th) Float
count_of_games_by_season A hash with season names (e.g. 20122013) as keys and counts of games as values Hash

League Statistics

Method Description Return Value
best_offense Name of the team with the highest average number of goals scored per game across all seasons. String
worst_offense Name of the team with the lowest average number of goals scored per game across all seasons. String

Season Statistics

These methods each take a season id as an argument and return the values described below.

Method Description Return Value
most_accurate_team Name of the Team with the best ratio of shots to goals for the season String
most_tackles Name of the Team with the most tackles in the season String

Iteration 3: Monday

Retro!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages