public AIEnvironment(AIEnvironment orig) { this.time = orig.time; this.aiIdMap = orig.aiIdMap; this.gameSp = orig.gameSp; this.stageSp = orig.stageSp; this.playersSp = orig.playersSp; this.players = new PlayerSnapshot[this.playersSp.Length]; for (var i = 0; i < this.players.Length; i++) { this.players[i].attacks = new AttackState[Player.attackCount]; } }
public AIEnvironment( IEnumerable <int> aiIdMap, IStateSnapshotProvider <GameSnapshot> gameSp, IStateSnapshotProvider <StageState> stageSp, IEnumerable <IStateSnapshotProvider <PlayerSnapshot> > playersSp ) { this.time = 0; this.aiIdMap = aiIdMap.ToArray(); this.gameSp = gameSp; this.stageSp = stageSp; this.playersSp = playersSp.ToArray(); this.players = new PlayerSnapshot[this.playersSp.Length]; for (var i = 0; i < this.players.Length; i++) { this.players[i].attacks = new AttackState[Player.attackCount]; } }