public BotViewModel(ICompetitor competitor) { Competitor = competitor; Wins = 0; Loses = 0; PlayAgainstId = new HashSet <Guid>(); }
public Team(ICompetitor c) { SpielerListe = new List <ICompetitor> { c }; CalcTeamSkillLevel(); }
public AntModel(AntViewModel viewModel, ICompetitor competitor) : base(competitor) { Competitor = competitor; ViewModel = viewModel; InitiateMovementShadow(); }
public BotViewModel(ICompetitor competitor) { Competitor = competitor; Wins = 0; Loses = 0; PlayAgainstId = new HashSet<Guid>(); }
public Competitor(ICompetitor competitor) { Id = competitor.Id; Url = competitor.Url; Description = competitor.Description; AvatarUrl = competitor.AvatarUrl; Name = competitor.Name; }
/// <summary> /// Füge Teilnehmer dem Turnier hinzu solange das Turnier noch nicht gestartet ist /// </summary> /// <param name="c">Teilnehmer der hinzugefügt wird</param> public void AddCompetitor(ICompetitor c) { // Teilnehmer können nur hinzugefügt werden wenn das Tournament noch nicht gestartet ist if (!IsStarted) { _competitorList.Add(c); } }
public CubeModel(CubeViewModel viewModel, ICompetitor competitor, int width, int heigth) : base(competitor) { Competitor = competitor; _cubeWidth = width; _cubeHeigth = heigth; ViewModel = viewModel; InitiateMovementShadow(); }
public AntModel(AntViewModel viewModel, ICompetitor competitor) : base(competitor) { _antHeigth = 0; _antWidth = 0; Competitor = competitor; ViewModel = viewModel; InitiateMovementShadow(); }
public DetailedChampionshipResult(ICompetitor competitor, Season season) { Competitor = competitor; Races = season.Races.Count(); Results = new RaceResult[Races]; for (var i = 0; i < Races; i++) { Results[i] = new NullRaceResult(competitor, season); } }
public static void SetLeadCompetitorDefaultsStep( ILeadCompetitor leadcompetitor, ICompetitor competitor) { leadcompetitor.Competitor = competitor; leadcompetitor.RATING = competitor.Rating; leadcompetitor.STRENGTHS = competitor.Strengths; leadcompetitor.WEAKNESSES = competitor.Weaknesses; leadcompetitor.STRATEGY = competitor.Strategy; leadcompetitor.Notes = competitor.Notes; leadcompetitor.INCUMBENT = false; }
/// <summary> /// Invokes the association lookup for competitors. /// </summary> /// <param name="form">the instance of the OpportunityCompetitor dialog</param> /// <param name="args">empty</param> public static void lueAssociateCompetitor_OnChangeStep(IOpportunityCompetitors form, EventArgs args) { if (form.lueAssociateCompetitor.LookupResultValue != null) { IOpportunity parentEntity = form.CurrentEntity as IOpportunity; ICompetitor relatedEntity = form.lueAssociateCompetitor.LookupResultValue as ICompetitor; var dialogService = form.Services.Get <IWebDialogService>(); if ((parentEntity != null) && (relatedEntity != null)) { if (parentEntity.Competitors.Any(oc => oc.Competitor == relatedEntity)) { if (dialogService != null) { string msg = string.Format(form.GetResource("DuplicateCompetitorMsg").ToString(), relatedEntity.CompetitorName); dialogService.ShowMessage(msg, form.GetResource("DuplicateCompetitorMsgTitle").ToString()); } } else { IOpportunityCompetitor relationshipEntity = EntityFactory.Create <IOpportunityCompetitor>(); relationshipEntity.Opportunity = parentEntity; relationshipEntity.Competitor = relatedEntity; parentEntity.Competitors.Add(relationshipEntity); if (!MySlx.MainView.IsInsertMode()) { parentEntity.Save(); } if (dialogService != null) { dialogService.SetSpecs(0, 0, 400, 600, "EditOpportunityCompetitor", string.Empty, true); dialogService.EntityType = typeof(IOpportunityCompetitor); string id; dialogService.CompositeKeyNames = "OpportunityId,CompetitorId"; if (PortalUtil.ObjectIsNewEntity(relationshipEntity)) { id = relationshipEntity.InstanceId.ToString(); ChangeManagementEntityFactory.RegisterInstance(relationshipEntity, relationshipEntity.InstanceId); relationshipEntity.SetOppCompetitorDefaults(relatedEntity); } else { id = string.Format("{0},{1}", relationshipEntity.OpportunityId, relationshipEntity.CompetitorId); } dialogService.EntityID = id; dialogService.ShowDialog(); } } } form.lueAssociateCompetitor.LookupResultValue = null; //34026 } }
/// <summary> /// Adds the selected competitor as a new opportunity competitor. /// </summary> /// <param name="form">The form.</param> /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param> public static void LoadAction1Step1(IOpportunityCompetitors form, EventArgs args) { Sage.Platform.WebPortal.SmartParts.WebActionEventArgs e = args as Sage.Platform.WebPortal.SmartParts.WebActionEventArgs; if (e != null) { ICompetitor competitor = form.lueAssociateCompetitor.LookupResultValue as ICompetitor; IOpportunityCompetitor opportunityCompetitor = e.PassThroughObject as IOpportunityCompetitor; if (opportunityCompetitor != null && competitor != null) { opportunityCompetitor.SetOppCompetitorDefaults(competitor); } } form.lueAssociateCompetitor.LookupResultValue = null; //34026 }
private BotUserControl ReturnBotControl(ICompetitor botClient) { BotUserControl botUserControl = null; foreach (var stageList in _tournamentLadderViewModel.StageLists) { var tempViewControl = stageList.FirstOrDefault(f => f.ViewModel.BotClient != null && f.ViewModel.BotClient.Id == botClient.Id); if (tempViewControl != null) { botUserControl = tempViewControl; } } return(botUserControl); }
/// <summary> /// Sets the flag, LostReplaced, on the opportunity competitor indicating that this opportunity /// competitor was associated as a competitor lost to. /// </summary> /// <param name="form">The opportunity closed lost form.</param> /// <param name="args">The event arguments.<see cref="System.EventArgs"/> instance containing the event data.</param> public static void lueCompetitorLoss_OnChange(IOpportunityClosedLost form, EventArgs args) { ICompetitor competitor = form.lueCompetitorLoss.LookupResultValue as ICompetitor; if (competitor != null) { IOpportunity opportunity = form.CurrentEntity as IOpportunity; opportunity.SetOppCompetitorReplacedFlag(competitor); } Sage.Platform.WebPortal.Services.IPanelRefreshService panelRefresh = form.Services.Get <Sage.Platform.WebPortal.Services.IPanelRefreshService>(); if (panelRefresh != null) { panelRefresh.RefreshMainWorkspace(); } }
public void AddScore(ICompetitor player, double score, ICompetitor oponent) { if (_scoreDictionary.Count == 0 || !_scoreDictionary.Any(f => f.Key.Equals(player))) { var gameScoreList = new List <GameScore> { new GameScore(oponent, score) }; _scoreDictionary.Add(player, gameScoreList); } else { var playerRecord = _scoreDictionary.First(f => f.Key.Equals(player)); var gameScore = new GameScore(oponent, score); playerRecord.Value.Add(gameScore); } }
public void AddScore(ICompetitor player, double score, ICompetitor oponent) { if (_scoreDictionary.Count == 0 || !_scoreDictionary.Any(f => f.Key.Equals(player))) { var gameScoreList = new List<GameScore> { new GameScore(oponent, score) }; _scoreDictionary.Add(player, gameScoreList); } else { var playerRecord = _scoreDictionary.First(f => f.Key.Equals(player)); var gameScore = new GameScore(oponent, score); playerRecord.Value.Add(gameScore); } }
public GameScore(ICompetitor oponent, double score) { Score = score; Oponent = oponent; }
public TicTacToeLocalBot(ICompetitor competitor) : base(competitor) { }
public BotClientBase(ICompetitor competitor) : base(competitor) { }
public void Detach(ICompetitor competitor) { _competitors.Remove(competitor); }
public void Attach(ICompetitor competitor) { _competitors.Add(competitor); }
public GameOverException(ICompetitor winner, int totalShots = 0) : base("GAME OVER!") { Winner = winner; TotalShots = totalShots; }
private BotViewModel ReturnWrappedBot(ICompetitor competitor) { return _viewModel.Bots.FirstOrDefault(bot => bot.Competitor.Id == competitor.Id); }
public List<GameScore> ShowGameScoresForPlayer(ICompetitor competitor) { return _scoreDictionary.FirstOrDefault(f => f.Key.Id == competitor.Id).Value; }
public NullRaceResult(ICompetitor competitor, Season season) : base(new RaceEntry() { Entrant = new DriverContract() { Driver = new Driver(), Season = season, Team = new Team() }, Race = new Race() { Season = season } }) { Completed = false; Position = 0; }
private BotUserControl ReturnBotControl(ICompetitor botClient) { BotUserControl botUserControl = null; foreach (var stageList in _tournamentLadderViewModel.StageLists) { var tempViewControl = stageList.FirstOrDefault(f => f.ViewModel.BotClient != null && f.ViewModel.BotClient.Id == botClient.Id); if (tempViewControl != null) { botUserControl = tempViewControl; } } return botUserControl; }
public DetailedDriverChampionshipResult(ICompetitor competitor, Season season) : base(competitor, season) { }
public HitBoard(ICompetitor owner, ICompetitor rival, in int dim) : base(dim)
public TankBlasterBot(ICompetitor competitor) : base(competitor) { LastMissileFiredRound = Int32.MinValue; }
private BotViewModel ReturnWrappedBot(ICompetitor competitor) { return(_viewModel.Bots.FirstOrDefault(bot => bot.Competitor.Id == competitor.Id)); }
public List <GameScore> ShowGameScoresForPlayer(ICompetitor competitor) { return(_scoreDictionary.FirstOrDefault(f => f.Key.Id == competitor.Id).Value); }
public List<GameScore> ScoreAgainstPlayer(ICompetitor competitor, ICompetitor oponent) { return _scoreDictionary.FirstOrDefault(f => f.Key.Id == competitor.Id).Value.Where(f=>f.Oponent.Id == oponent.Id).ToList(); }
public List <GameScore> ScoreAgainstPlayer(ICompetitor competitor, ICompetitor oponent) { return(_scoreDictionary.FirstOrDefault(f => f.Key.Id == competitor.Id).Value.Where(f => f.Oponent.Id == oponent.Id).ToList()); }
public UserMismatchingException(ICompetitor User) : base() { Console.WriteLine($"{User.GetName()}无权限使用技能"); }
public void RegisterPlayer(ICompetitor player) { players.Add(player); }
public TicTacToeWebBot(ICompetitor competitor) : base(competitor) { }