示例#1
0
        public override Destroyer CreateDestroyer(int x, int y, bool horizontal)
        {
            AtomicDestroyer new_destroyer = (AtomicDestroyer)destroyer_instance.DeepClone();

            new_destroyer.X = x;
            new_destroyer.Y = y;
            new_destroyer.Rotate(horizontal);
            return(new_destroyer);
        }
示例#2
0
 public AtomicShipFactory(string token, string roomId)
     : base(token, roomId)
 {
     destroyer_instance = new AtomicDestroyer(token, roomId, 0, 0, false);
     submarine_instance = new AtomicSubmarine(token, roomId, 0, 0, false);
 }