Skip to content

Commit

Permalink
Add config checking to main
Browse files Browse the repository at this point in the history
  • Loading branch information
eloylp committed Nov 21, 2019
1 parent 7862e54 commit 74c5469
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package main

import (
"log"
)

func main() {

cfg := Config()
if err := CheckConfig(cfg); err != nil {
log.Fatal(err)
}
b := RandomBoard(cfg.boardX, cfg.boardY)
g := NewGame(b, cfg.generations, cfg.intervalSecs)
g.Run()
Expand Down

0 comments on commit 74c5469

Please sign in to comment.