Exemplo n.º 1
0
		public static Player AddPlayer(string name, Location location)
		{
			Player player = new Player();
			player.FullName = name;
			player.HomeLocationId = location.ID;
			playersDb.Players.Add(player);
			playersDb.SaveChanges();
			Console.WriteLine("Player added: {0}", player.FullName);
			return player;
		}
Exemplo n.º 2
0
		public static Player AddOrFindPlayer(string name, Location location)
		{
			if (name.StartsWith("*"))
				return PlayerFinder.AddPlayer(name.Substring(1), location);
			else
				return PlayerFinder.FindPlayer(name);
		}