public List <GamerView> GetGamerViewList(List <Gamer> gamerList) { var mapper = new Mappered(); List <GamerView> outputGamerList = new List <GamerView>(); foreach (Gamer player in gamerList) { outputGamerList.Add(mapper.MappingByAutoMapper(player)); } return(outputGamerList); }
public GamerView GiveCardToTheRealPlayer() { Gamer gamer = new Gamer(); foreach (Gamer player in StaticGamerList.StaticGamersList) { if (player.Role == GamerRole.Gamer) { gamer = player; } } var mapper = new Mappered(); DoRoundForGamer(gamer, StaticCardList.StaticCardsList); GamerView gamerView = mapper.MappingByAutoMapper(gamer); return(gamerView); }