コード例 #1
0
        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();
        }
コード例 #2
0
        private void InitializeMaze(IAxisFactory axisFactory, IMazeViewDataFactory mazeViewDataFactory)
        {
            IMazeNodeData nodeData = _mazeNodeDataBuilder.GenerateNodeData(12345);
            IMazeViewData viewData = _mazeNodeDataBuilder.GenerateViewData(nodeData, axisFactory, mazeViewDataFactory);

            _maze.Initialize(nodeData, viewData);
        }
コード例 #3
0
 public IMazeViewData GenerateViewData(IMazeNodeData nodeData, IAxisFactory axisFactory, IMazeViewDataFactory mazeViewDataFactory)
 {
     return(mazeViewDataFactory.CreateMazeViewData(fGridStart, fGridEnd, fGridSize, nodeData, axisFactory));
 }