public PcPart(string name, PcType type, string information, List <Propertie> properties, string id = "") { Id = id; _Name = name; _Type = type; Information = information; Properties = properties; }
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); }
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); }
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); }
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; }