Example #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            Loby input = (Loby)obj;

            if (this.Name == input.Name)
            {
                return(true);
            }
            return(false);
        }
Example #2
0
File: Game.cs Project: Tatko95/Hero
 public Game(Loby loby)
 {
     _id    = Guid.NewGuid();
     _loby  = loby;
     Gamer1 = new Hero(_loby.Creater, true);
     Gamer2 = new Hero(_loby.Enemy, false);
     //#region First turn
     //Random rnd = new Random();
     //if (rnd.Next(2) == 0)
     //    WhoTurn = Gamer1;
     //else
     //    WhoTurn = Gamer2;
     //#endregion
     WhoTurn = Gamer1;
     Winner  = null;
 }