diff options
| author | demo <demo@antix1> | 2026-05-24 23:14:18 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-05-24 23:14:18 -0400 |
| commit | 26ce29b91e85b024eff7d5e3fd399080fd800ea0 (patch) | |
| tree | ef88925b5283511ae6ec372c344e67fe7f778779 | |
| parent | 6a026fd2b1818a7265d5904b5c1a800d2a21b21b (diff) | |
feat: add more players
| -rw-r--r-- | main.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -23,12 +23,18 @@ func game(numSecs int) { p1 := player(1, &wg, p0) p2 := player(2, &wg, p1) + p3 := player(3, &wg, p2) + p4 := player(4, &wg, p3) + p5 := player(5, &wg, p4) + p6 := player(6, &wg, p5) + p7 := player(7, &wg, p6) + t := time.Tick(time.Duration(numSecs) * time.Second) p0 <- Ball{} loop: - for b := range p2 { + for b := range p7 { select { case p0 <- b: case <-t: |
