add main entry point

This commit is contained in:
mappu 2024-01-07 15:33:50 +13:00
parent 279d536458
commit 7896dc9f6b
1 changed files with 20 additions and 0 deletions

20
main.go Normal file
View 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)
}