public Form1( IAxisFactory axisFactory, IMazeViewDataFactory mazeViewDataFactory, MazeNodeDataBuilder mazeNodeDataBuilder, IVisualizer visualizer, UnitMover unitMover, Maze maze, Keybindings keybindings) { _maze = maze; _unitMover = unitMover; _visualizer = visualizer; _mazeNodeDataBuilder = mazeNodeDataBuilder; _keybindings = keybindings; InitializeComponent(); InitializeMaze(axisFactory, mazeViewDataFactory); InitializeKeybindings(axisFactory); DoubleBuffered = true; fAnimator = new Timer() { Interval = 500, }; fAnimator.Tick += FAnimator_Tick1; fAnimator.Start(); }
private void InitializeMaze(IAxisFactory axisFactory, IMazeViewDataFactory mazeViewDataFactory) { IMazeNodeData nodeData = _mazeNodeDataBuilder.GenerateNodeData(12345); IMazeViewData viewData = _mazeNodeDataBuilder.GenerateViewData(nodeData, axisFactory, mazeViewDataFactory); _maze.Initialize(nodeData, viewData); }
public IMazeViewData GenerateViewData(IMazeNodeData nodeData, IAxisFactory axisFactory, IMazeViewDataFactory mazeViewDataFactory) { return(mazeViewDataFactory.CreateMazeViewData(fGridStart, fGridEnd, fGridSize, nodeData, axisFactory)); }