示例#1
0
        public static WithoutCap Instance()
        {
            if (instance == null)
            {
                instance = new WithoutCap();
            }

            return(instance);
        }
示例#2
0
 public Person(string name)
 {
     this.name  = name;
     this.state = WithoutCap.Instance();
 }
示例#3
0
 public override void takeCap(Person person)
 {
     person.ChangeState(WithoutCap.Instance());
 }