コード例 #1
0
        public IGameState[] PerformLogic(GameTime gameTime, GameInfo gameInfo)
        {
            var availablePaths = gameInfo.CurrentPlayer.CurrentNode.LinksTo;
            var waitState      = StateFactory.GetState(GameStates.Wait);

            ChoosePathHelper.TravelToNodes(availablePaths, gameInfo, (node, location) => PathChosen(node, gameInfo, waitState));
            return(new[] { waitState });
        }
コード例 #2
0
        public IGameState[] PerformLogic(GameTime gameTime, GameInfo gameInfo)
        {
            var availablePaths = gameInfo.WorldNodes;
            var waitState      = StateFactory.GetState(GameStates.GameStates.Wait);

            ChoosePathHelper.TravelToNodes(availablePaths, gameInfo, (node, location) => PathChosen(node, gameInfo, waitState), false);
            return(new[] { waitState });
        }
コード例 #3
0
        private void BeginTravel(GameInfo gameInfo, IGameState waitState)
        {
            _confirmWindow.Close();
            gameInfo.CurrentPlayer.RollAmount = 0;

            var validTransportNodes = (from travelNode in gameInfo.WorldNodes.Where(i => i.BindedLogic.PureLogic is Travel)
                                       let travelLogic = (Travel)travelNode.BindedLogic.PureLogic
                                                         where travelLogic.IslandType != IslandType && travelLogic.IslandType != IslandType.StartIsland && travelLogic.TransportType == TransportType
                                                         select travelNode).ToList();

            ChoosePathHelper.TravelToNodes(validTransportNodes, gameInfo, (node, location) => NodeChosen(node, gameInfo, waitState));
        }