func (f flags) createDomInitializers() []domInitializer {
	timeFunc := func() int64 {
		return time.Now().Unix()
	}
	log := log.New(f.dom, timeFunc)
	httpClient := http.Client{
		Timeout: f.httpTimeout,
	}
	canvasCfg := canvas.Config{
		TileLength: f.tileLength,
		MainColor:  f.divColor(".mainColor"),
		DragColor:  f.divColor(".dragColor"),
		TileColor:  f.divColor(".tileColor"),
		ErrorColor: f.divColor(".errorColor"),
	}
	canvasCreator := canvasCreator{
		dom:       f.dom,
		log:       log,
		canvasCfg: canvasCfg,
	}
	user := user.New(f.dom, log, httpClient)
	board := new(board.Board)
	canvas := canvasCfg.New(f.dom, log, board, ".game>.canvas")
	game := game.New(f.dom, log, board, canvas, canvasCreator)
	lobby := lobby.New(f.dom, log, game)
	socket := socket.New(f.dom, log, user, game, lobby)
	user.Socket = socket   // [circular reference]
	canvas.Socket = socket // [circular reference]
	game.Socket = socket   // [circular reference]
	lobby.Socket = socket  // [circular reference]
	return []domInitializer{log, user, canvas, game, lobby, socket}
}
// createDomInitializers creates the components that need to be initialized.
createDomInitializers creates the components that need to be initialized.
// createDomInitializers creates the components that need to be initialized .
func (f flags) createDomInitializers() []domInitializer {
	timeFunc := func() int64 {
		return time.Now().Unix()
	}
	log := log.New(f.dom, timeFunc)
	httpClient := http.Client{
		Timeout: f.httpTimeout,
	}
	canvasCfg := canvas.Config{
		TileLength: f.tileLength,
		MainColor:  f.divColor(".mainColor"),
		DragColor:  f.divColor(".dragColor"),
		TileColor:  f.divColor(".tileColor"),
		ErrorColor: f.divColor(".errorColor"),
	}
	canvasCreator := canvasCreator{
		dom:       f.dom,
		log:       log,
		canvasCfg: canvasCfg,
	}
	user := user.New(f.dom, log, httpClient)
	board := new(board.Board)
	canvas := canvasCfg.New(f.dom, log, board, ".game>.canvas")
	game := game.New(f.dom, log, board, canvas, canvasCreator)
	lobby := lobby.New(f.dom, log, game)
	socket := socket.New(f.dom, log, user, game, lobby)
	user.Socket = socket   
	canvas.Socket = socket 
	game.Socket = socket   
	lobby.Socket = socket  
	return []domInitializer{log, user, canvas, game, lobby, socket}
}
func ( f flags ) createDomInitializers ( ) [ ] domInitializer { timeFunc := func ( ) int64 { return time . Now ( ) . Unix ( ) } log := log . New ( f . dom , timeFunc ) httpClient := http . Client { Timeout : f . httpTimeout , } canvasCfg := canvas . Config { TileLength : f . tileLength , MainColor : f . divColor ( " " ) , DragColor : f . divColor ( " " ) , TileColor : f . divColor ( " " ) , ErrorColor : f . divColor ( " " ) , } canvasCreator := canvasCreator { dom : f . dom , log : log , canvasCfg : canvasCfg , } user := user . New ( f . dom , log , httpClient ) board := new ( board . Board ) canvas := canvasCfg . New ( f . dom , log , board , " " ) game := game . New ( f . dom , log , board , canvas , canvasCreator ) lobby := lobby . New ( f . dom , log , game ) socket := socket . New ( f . dom , log , user , game , lobby ) user . Socket = socket canvas . Socket = socket game . Socket = socket lobby . Socket = socket return [ ] domInitializer { log , user , canvas , game , lobby , socket } }
createDomInitializers creates the components that need to be initialized.
createDomInitializers creates the components that need to be initialized .
// [circular reference] // [circular reference] // [circular reference] // [circular reference]