コード例 #1
0
 public override CellState GetNextState(int neighborhoods)
 {
     if (neighborhoods == 2 || neighborhoods == 3)
     {
         return(this);
     }
     else
     {
         return(Dead.GetInstance());
     }
 }
コード例 #2
0
 public static CellState GetDeadCell() => Dead.GetInstance();