示例#1
0
        private Board()
        {
            this.gameboard      = new Abs_Box[40];
            this.jailed_players = new Player[4];
            this.dices          = SingletonDice.GetInstance();
            ObserveDice observer = new ObserveDice("1");

            dices.Attach(observer);
        }
示例#2
0
 public static SingletonDice GetInstance()
 {
     if (instance == null)
     {
         lock (objlock)
         {
             if (instance == null)
             {
                 instance = new SingletonDice();
             }
         }
     }
     return(instance);
 }