public void createBoardSection() { int size = getSizePicture(row, col); // Create Boardsection each section and assignment velue in section. for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { boardSection[i, j] = new BoardSection(i, j, typeBoard, this, myBoardGame); // for manage graphic appropiate with differ size board. must know size board. boardSection[i, j].setSizePictureItem(size); } } }
public BoardPinch(Form myForm, Panel panelBoard, int row, int col, bool AI, MyBoardGame myBoardGame) { this.myBoardGame = myBoardGame; this.myForm = myForm; typeBoard = (int)type.PinchDraught; flag_AI = AI; temp_row = -1; temp_col = -1; listSectionSelected = new List <Tuple <int, int, int, int> >(); //listSectionSelectedFuture = new List<Tuple<int, int, int, int>>(); listSectionItemKilled = new List <Tuple <int, int> >(); listSectionItemKiller = new List <Tuple <int, int> >(); // use in forced kill mode. listSectionItemKillerFuture = new List <Tuple <int, int> >(); // use in forced kill mode. listItemActiveAI = new List <int>(); boardSection = new BoardSection[row, col]; // assign size board. this.setRowColBoard(row, col); createBoardSection(); // create Boardsection. accessContent(panelBoard); // access object and assign Panel to Array PanelSection. createPictureBoxInBoardSection(row, col); }