Exemplo n.º 1
0
        public GameService(
            VisionService visionService,
            MovementService movementService,
            PathingService pathingService
            )
        {
            VisionService = visionService;

            MovementService = movementService;

            PathingService = pathingService;
        }
Exemplo n.º 2
0
        public bool TryMove(Game game, Unit unit, IList <int> cells)
        {
            if (unit.Owner != game.CurrentPlayer)
            {
                return(false);
            }

            int[] moveCells = MovementService.TryMove(game, unit, cells);

            if (moveCells.Length == 0)
            {
                return(false);
            }

            // TODO: fire "moved" event?
            return(true);
        }