Skip to content

Commit

Permalink
Handle change from "Home", "Away" to team_Name in bestCase()
Browse files Browse the repository at this point in the history
  • Loading branch information
gtpash committed Jul 19, 2017
1 parent dd022c4 commit 487a687
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions problem2.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ generateBestCase <- function(teamName) {
#current team wins out
simSeason$Winner[which(simSeason$`Home Team` == teamName | simSeason$`Away Team` == teamName)] <- teamName

#games b/w teams in other divisions that are in you
othergames <- which(simSeason$Winner == "Home" | simSeason$Winner == "Away")
#get indices for games not yet handled
simgames <- nrow(simSeason)
temp <- 1:simgames
othergames <- which(!temp%in%union(outconfs,outdivs))
rm(temp,simgames)


}
Expand Down

0 comments on commit 487a687

Please sign in to comment.