Exemplo n.º 1
0
 public PcPart(string name, PcType type, string information, List <Propertie> properties,
               string id = "")
 {
     Id          = id;
     _Name       = name;
     _Type       = type;
     Information = information;
     Properties  = properties;
 }
Exemplo n.º 2
0
        private Piece createPiece(Field field, int x, int y, PcType type = PcType.Random)
        {
            if (type == PcType.Random)
            {
                type = (PcType)rand.Next((int)PcType.Leng);
            }
            var piece = new Piece(field, x, y, type);

            field.PutPiece(piece);
            return(piece);
        }
Exemplo n.º 3
0
        public Piece(Field field, int x, int y, PcType type, PcColor?color = null)
        {
            this.Field = field;
            this.pos   = new NPoint(x, y);
            this.Color = color ?? PC_CLRS[(int)type];

            var PcShp = PC_SHPS[(int)type];

            this.Shape = new NPoint[PcShp.Length];
            PcShp.CopyTo(this.Shape, 0);
        }
Exemplo n.º 4
0
        public Piece(Field field, int x, int y, PcType type, PcColor? color= null)
        {
            this.Field = field;
            this.pos = new NPoint(x, y);
            this.Color = color ?? PC_CLRS[(int)type];

            var PcShp = PC_SHPS[(int)type];
            this.Shape = new NPoint[PcShp.Length];
            PcShp.CopyTo(this.Shape, 0);
        }
Exemplo n.º 5
0
 private Piece createPiece(Field field, int x, int y, PcType type = PcType.Random)
 {
     if (type == PcType.Random) { type = (PcType)rand.Next((int)PcType.Leng); }
     var piece = new Piece(field, x, y, type);
     field.PutPiece(piece);
     return piece;
 }