diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -12,16 +12,15 @@ type Ball struct{ hits int } func main() { numSecs := flag.Int("s", 1, "Number of seconds game should last") + numPlayers := flag.Int("p", 2, "Number of players") flag.Parse() - game(*numSecs) + game(*numSecs, *numPlayers) } -func game(numSecs int) { +func game(numSecs, numPlayers int) { var wg sync.WaitGroup - // FIXME: make this a flag. - const numPlayers = 7 players := make([]chan Ball, numPlayers+1) players[0] = make(chan Ball) |
