コード例 #1
0
 public OXGameState(string aPlayerA, string aPlayerB, OXActor aJustActed) : base(aPlayerA, aPlayerB, aJustActed, GRID_SIZE, GRID_SIZE)
 {
     for (int x = 0; x < GridWidth; ++x)
     {
         for (int y = 0; y < GridHeight; ++y)
         {
             Grid[x, y] = null;
         }
     }
 }
コード例 #2
0
        public override IEnumerable <IAction> GetAllMoves()
        {
            List <IAction> actions = new List <IAction>();

            OXActor nowActing = new OXActor(ActorJustActed.Name.Equals(PlayerAName) ? PlayerBName : PlayerAName);

            for (int x = 0; x < GridWidth; x++)
            {
                for (int y = 0; y < GridHeight; y++)
                {
                    if (Grid[x, y] == null)
                    {
                        IAction newAction = new OXAction(nowActing, this, x, y);
                        actions.Add(newAction);
                    }
                }
            }

            return(actions);
        }
コード例 #3
0
 public OXAction(OXActor aActing, OXGameState aState, int x, int y) : base(aActing)
 {
     this._incomingState = aState;
     this._x             = x;
     this._y             = y;
 }
コード例 #4
0
 public OXGameState(OXGameState aOtherGameState, OXActor aJustActed, AbstractActor[,] aGrid) : base(aOtherGameState.PlayerAName, aOtherGameState.PlayerBName, aJustActed, aGrid)
 {
 }
コード例 #5
0
 public OXGameState(string aPlayerA, string aPlayerB, OXActor aJustActed, AbstractActor[,] aGrid) : base(aPlayerA, aPlayerB, aJustActed, aGrid)
 {
 }