示例#1
0
        /// <summary>
        /// Process a game step proceeding logic
        /// </summary>
        /// <param name="targetWorld">World to apply step logic process</param>
        /// <param name="stepCommand">A command given to current step</param>
        /// <returns>Step processing result</returns>
        public StepResult ProcessStep(World targetWorld, Core.LogicCommand stepCommand)
        {
            Core.CommandResult commandResult = m_commandProcessor.ApplyCommand(targetWorld, stepCommand);
            m_updateProcessor.UpdateWorldOneStep(targetWorld);

            // Gather Results
            List <Core.Game.Item> receivedItems = targetWorld.MyHome.RefreshAndGetArrivedItems();

            return(new StepResult()
            {
                commandResult = commandResult,
                receivedItems = receivedItems
            });
        }
示例#2
0
 static void Undocked(Core.CommandResult result)
 {
     System.Console.WriteLine($"{result.ShuttleName} Undocked.");
 }
示例#3
0
 static void DockingFailed(Core.CommandResult result)
 {
     System.Console.WriteLine($"Failure!!, {result.ShuttleName} could not be docked. Reason>>> {result.Message}");
 }
示例#4
0
 static void DockingSuccessful(Core.CommandResult result)
 {
     System.Console.WriteLine($"Success!!, {result.ShuttleName} got docked.");
 }