summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-05-24 23:14:18 -0400
committerdemo <demo@antix1>2026-05-24 23:14:18 -0400
commit26ce29b91e85b024eff7d5e3fd399080fd800ea0 (patch)
treeef88925b5283511ae6ec372c344e67fe7f778779
parent6a026fd2b1818a7265d5904b5c1a800d2a21b21b (diff)
feat: add more players
-rw-r--r--main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3b46af5..56d74ec 100644
--- a/main.go
+++ b/main.go
@@ -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: