A for loop could work, but you can use tidyverse functions to automate that:
# Create reproducible example data
set.seed(10)
dat <- data.frame(Game.ID = rep(LETTERS[1:3], each=2),
pred_era = runif(6, min=1, max=7))
dat
#> Game.ID pred_era
#> 1 A 4.044869
#> 2 A 2.840611
#> 3 B 3.561446
#> 4 B 5.158612
#> 5 C 1.510816
#> 6 C 2.352620
library(dplyr)
dat %>%
group_by(Game.ID) %>%
mutate(results = case_when(pred_era == max(pred_era) ~ 0,
pred_era == min(pred_era) ~ 1))
#> # A tibble: 6 x 3
#> # Groups: Game.ID [3]
#> Game.ID pred_era results
#> <chr> <dbl> <dbl>
#> 1 A 4.04 0
#> 2 A 2.84 1
#> 3 B 3.56 1
#> 4 B 5.16 0
#> 5 C 1.51 1
#> 6 C 2.35 0
Created on 2020-12-31 by the reprex package (v0.3.0)