Beispiel #1
0
 void Write(ICurrentGame game)
 {
     foreach (IPlayer player in game.Players)
     {
         var nextPlayerText = player == game.NextPlayer ? " and their go is next" : "";
         m_Writer.WriteLine("Player {0} is on {1} {2}", player.Name, player.CurrentSquare.Name, nextPlayerText);
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            var gameParams = new NewGameParams()
            {
                MapHeight    = 10,
                MapWidth     = 20,
                PlayerNumber = 1
            };
            var ui = new UIDrawing();

            using (IGameManager gameManager = new GameManager(ui))
            {
                ICurrentGame game = gameManager.NewGame(gameParams);
                game.Start();
            }
        }
Beispiel #3
0
 /// <summary>
 /// Constructs a Riot Client with given implemented service for each Riot service group.
 /// </summary>
 /// <param name="champion">The champion.</param>
 /// <param name="currentGame">The current game.</param>
 /// <param name="featuredGames">The featured games.</param>
 /// <param name="game">The game.</param>
 /// <param name="league">The league.</param>
 /// <param name="lolStaticData">The lol static data.</param>
 /// <param name="lolStatus">The lol status.</param>
 /// <param name="match">The match.</param>
 /// <param name="matchHistory">The match history.</param>
 /// <param name="matchList">The match list.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="summoner">The summoner.</param>
 /// <param name="team">The team.</param>
 /// <param name="championMastery">Champion Masteries</param>
 public RiotClient(IChampion champion, ICurrentGame currentGame, IFeaturedGames featuredGames, IGame game, ILeague league, ILolStaticData lolStaticData,
                   ILolStatus lolStatus, IMatch match, IMatchList matchList, IStats stats, ISummoner summoner, ITeam team, IChampionMastery championMastery)
 {
     this.Champion        = champion;
     this.CurrentGame     = currentGame;
     this.FeaturedGames   = featuredGames;
     this.Game            = game;
     this.League          = league;
     this.LolStaticData   = lolStaticData;
     this.LolStatus       = lolStatus;
     this.Match           = match;
     this.MatchList       = matchList;
     this.Stats           = stats;
     this.Summoner        = summoner;
     this.Team            = team;
     this.ChampionMastery = championMastery;
 }
Beispiel #4
0
 /// <summary>
 /// Constructs a Riot Client with given implemented service for each Riot service group.
 /// </summary>
 /// <param name="champion">The champion.</param>
 /// <param name="currentGame">The current game.</param>
 /// <param name="featuredGames">The featured games.</param>
 /// <param name="game">The game.</param>
 /// <param name="league">The league.</param>
 /// <param name="lolStaticData">The lol static data.</param>
 /// <param name="lolStatus">The lol status.</param>
 /// <param name="match">The match.</param>
 /// <param name="matchHistory">The match history.</param>
 /// <param name="matchList">The match list.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="summoner">The summoner.</param>
 /// <param name="team">The team.</param>
 public RiotClient(IChampion champion, ICurrentGame currentGame, IFeaturedGames featuredGames, IGame game, ILeague league, ILolStaticData lolStaticData,
     ILolStatus lolStatus, IMatch match, IMatchHistory matchHistory, IMatchList matchList, IStats stats, ISummoner summoner, ITeam team)
 {
     this.Champion = champion;
     this.CurrentGame = currentGame;
     this.FeaturedGames = featuredGames;
     this.Game = game;
     this.League = league;
     this.LolStaticData = lolStaticData;
     this.LolStatus = lolStatus;
     this.Match = match;
     this.MatchHistory = matchHistory;
     this.MatchList = matchList;
     this.Stats = stats;
     this.Summoner = summoner;
     this.Team = team;
 }
Beispiel #5
0
 /// <summary>
 /// Constructs a Riot Client with given implemented service for each Riot service group.
 /// </summary>
 /// <param name="champion">The champion.</param>
 /// <param name="currentGame">The current game.</param>
 /// <param name="featuredGames">The featured games.</param>
 /// <param name="game">The game.</param>
 /// <param name="league">The league.</param>
 /// <param name="lolStaticData">The lol static data.</param>
 /// <param name="lolStatus">The lol status.</param>
 /// <param name="match">The match.</param>
 /// <param name="matchHistory">The match history.</param>
 /// <param name="matchList">The match list.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="summoner">The summoner.</param>
 /// <param name="team">The team.</param>
 public RiotClient(IChampion champion, ICurrentGame currentGame, IFeaturedGames featuredGames, IGame game, ILeague league, ILolStaticData lolStaticData,
     ILolStatus lolStatus, IMatch match, IMatchHistory matchHistory, IMatchList matchList, IStats stats, ISummoner summoner, ITeam team)
 {
     //we need to let Ninject know which concrete type to use to satisfy the interface.
     this.Champion = champion;
     this.CurrentGame = currentGame;
     this.FeaturedGames = featuredGames;
     this.Game = game;
     this.League = league;
     this.LolStaticData = lolStaticData;
     this.LolStatus = lolStatus;
     this.Match = match;
     this.MatchHistory = matchHistory;
     this.MatchList = matchList;
     this.Stats = stats;
     this.Summoner = summoner;
     this.Team = team;
 }
Beispiel #6
0
 /// <summary>
 /// Constructs a Riot Client with given implemented service for each Riot service group.
 /// </summary>
 /// <param name="champion">The champion.</param>
 /// <param name="currentGame">The current game.</param>
 /// <param name="featuredGames">The featured games.</param>
 /// <param name="game">The game.</param>
 /// <param name="league">The league.</param>
 /// <param name="lolStaticData">The lol static data.</param>
 /// <param name="lolStatus">The lol status.</param>
 /// <param name="match">The match.</param>
 /// <param name="matchHistory">The match history.</param>
 /// <param name="matchList">The match list.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="summoner">The summoner.</param>
 /// <param name="team">The team.</param>
 public RiotClient(IChampion champion, ICurrentGame currentGame, IFeaturedGames featuredGames, IGame game, ILeague league, ILolStaticData lolStaticData,
                   ILolStatus lolStatus, IMatch match, IMatchHistory matchHistory, IMatchList matchList, IStats stats, ISummoner summoner, ITeam team)
 {
     //we need to let Ninject know which concrete type to use to satisfy the interface.
     this.Champion      = champion;
     this.CurrentGame   = currentGame;
     this.FeaturedGames = featuredGames;
     this.Game          = game;
     this.League        = league;
     this.LolStaticData = lolStaticData;
     this.LolStatus     = lolStatus;
     this.Match         = match;
     this.MatchHistory  = matchHistory;
     this.MatchList     = matchList;
     this.Stats         = stats;
     this.Summoner      = summoner;
     this.Team          = team;
 }
Beispiel #7
0
 public bool ExitGame(ICurrentGame currentGame)
 {
     throw new NotImplementedException();
 }