Beispiel #1
0
 public Player(string name, bool own = false, Color color = default(Color), int x = 0, int y = 0)
 {
     Name = name;
     if (color == default(Color))
     {
         Color = Game.GetRandomColor();
     }
     else
     {
         Color = color;
     }
     //ID = NextID;
     //NextID++;
     Own = own;
     //Position = new Point(0, 0);
     if (x != 0 && y != 0)
     {
         Position = new Point(x, y);
     }
     else
     {
         Position = new Point(Game.GameSize.X / 2, 1);
     }
     Score = 0;
     Lives = 3;
 }