public Figura(Figura fig) { if (fig != null) { BorW = fig.BorW; name = new Opisanie_figura(fig.name); } }
public Cells(Figura f, int posX, int posY, int x, int y, string BorW) { name_figur = f; positionX = posX; positionY = posY; X = x; Y = y; pos_BorW = BorW; }
public string pos_BorW;//Цвет клетки на которой стоит фигура public Cells() { name_figur = null; positionX = -1; positionY = -1; X = -1; Y = -1; pos_BorW = null; }
public bool Compar(Figura f) { if (f == null) { return(false); } else { return(BorW == f.BorW && name.Compar(f.name)); } }
public static void init_figurs() { figury = new Figura[COLOR.Length, NAME_FIGURY.Length]; for (int i = 0; i < COLOR.Length; i++) { for (int g = 0; g < NAME_FIGURY.Length; g++) { Opisanie_figura fig = new Opisanie_figura(NAME_FIGURY[g], OCHKI_FIGURY[g]); figury[i, g] = new Figura(COLOR[i], fig); } } }
public Cells(Cells c) { if (c != null) { if (c.name_figur == null) { name_figur = null; } else { name_figur = new Figura(c.name_figur); } positionX = c.positionX; positionY = c.positionY; X = c.X; Y = c.Y; pos_BorW = c.pos_BorW; } }