public Side(Game game) { this.game = game; // Initialize pieces this.pieces = (from piece in this.game.Pieces where piece.Side == this select piece).ToArray(); Debug.Assert(pieces.Length == 16); this.jiang = (Jiang)(from p in this.pieces where p.GetType() == jiang.GetType() select p).First(); // Initialize Oppopent int i = Array.IndexOf(this.game.Sides, this); this.Opponent = this.game.Sides[Math.Abs(1 - i)]; // this = 1 then opponent = 0, and vice versa }
public Ju(Game game, Side side) : base(game, side) { }
public Board(Game game) { this.game = game; this.InitBoard(); this.UpdatePiecePositionOnBoard(); }