add main entry point
This commit is contained in:
parent
279d536458
commit
7896dc9f6b
20
main.go
Normal file
20
main.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
numPlayers := flag.Int("Players", 4, "Number of CPU players")
|
||||
seed := flag.Int64("Seed", time.Now().UnixNano(), "Random game seed")
|
||||
flag.Parse()
|
||||
|
||||
entropy := rand.New(rand.NewSource(*seed))
|
||||
|
||||
fmt.Printf("Random seed: %d\n", *seed)
|
||||
|
||||
PlayGame(*numPlayers, entropy)
|
||||
}
|
Loading…
Reference in New Issue
Block a user