//인터페이스 상속 끝.================================================== #endregion //밑에 부터 작업. public bool FindChip(int _iId, out int c, out int r, cs _iChip = cs.RetFail) { r = 0; c = 0; DM.ARAY[_iId].FindLastRowCol(_iChip, ref c, ref r); return((c >= 0 && r >= 0) ? true : false); }
//인터페이스 상속 끝.================================================== #endregion //위에 부터 작업. public bool FindChip(int _iId, out int _iC, out int _iR, cs _iChipStat) { //DM.ARAY[_iId].FindFrstRowCol(_iChipStat, ref _iC, ref _iR); //return (_iC >= 0 && _iR >= 0) ? true : false; _iC = 0; _iR = 0; return(false); }
//인터페이스 상속 끝.================================================== #endregion //위에 부터 작업. //인덱스 데이터에서 작업해야 되는 컬로우를 뽑아서 리턴. public bool FindChip(int _iId, out int c, out int r, cs _iChip = cs.RetFail) { c = 0; r = 0; _iId = 0; return(DM.ARAY[_iId].FindLastColFrstRow(ref c, ref r, _iChip)); }
//인터페이스 상속 끝.================================================== #endregion //위에 부터 작업. public bool FindChip(int _iId, out int c, out int r, cs _iChip = cs.RetFail) { c = 0; r = 0; DM.ARAY[_iId].FindLastColFrstRow((cs)_iChip, ref c, ref r); return(true); }
public bool CheckStat(int c, int r, cs Stat) { if (r < 0 || c < 0 || r > m_iMaxRow || c > m_iMaxCol) { return(false); } return(GetStat(c, r) == Stat); }
public void SetDisp(cs _eStat, String _sName, Color _cColor) { StatProp[(int)_eStat].Caption = _sName; StatProp[(int)_eStat].Visible = true; StatProp[(int)_eStat].ChipColor = _cColor; SetPopupMenuStat(); OnChange(); }
public int FindFrstCol(cs _eStat) { int iRowNum = -1; int iColNum = -1; FindFrstColRow(_eStat, ref iColNum, ref iRowNum); return(iColNum); }
//Get All Count by m_tChipstatus. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public int GetCntStat(cs Stat) { int iCnt = 0; for (int r = 0; r < m_iMaxRow; r++) { iCnt += GetCntRowStat(r, Stat); } return(iCnt); }
public void b() { GC.SuppressFinalize(this); this.a(); this.az.Clear(); this.n = null; this.ag = null; this.au = null; this.at = null; this.@as = null; this.ar = null; this.aq = null; this.ap = null; this.ao = null; this.an = null; this.am = null; this.al = null; this.ak = null; this.aj = null; this.ai = null; this.ah = null; this.af = null; this.ae = null; this.ad = null; this.ac = null; this.ab = null; this.aa = null; this.z = null; this.y = null; this.x = null; this.w = null; this.v = null; this.u = null; this.t = null; this.s = null; this.r = null; this.q = null; this.p = null; this.c = null; this.av = null; this.o = null; this.m = null; this.l = null; this.k = null; this.j = null; this.i = null; this.h = null; this.g = null; this.f = null; this.e = null; this.d = null; this.b = null; this.a = null; this.aw = null; this.ax = null; this.ay = null; }
public int FindLastRow(cs _eStat) { //Local Var. int iRowNum = -1; int iColNum = -1; FindLastRowCol(_eStat, ref iColNum, ref iRowNum); return(iRowNum); }
public int FindLastCol(cs _eStat) { //Local Var. int iRowNum = -1; int iColNum = -1; FindLastColRow(_eStat, ref iColNum, ref iRowNum); //return Find Row No. return(iColNum); }
public bool CheckAllStatCol(cs Stat, int c) { for (int r = 0; r < m_iMaxRow; r++) { if (!m_bNotUse[c, r] && !CheckStat(c, r, Stat)) { return(false); } } return(true); }
//inline func //====================================================================== public bool SetStat(int _iC, int _iR, cs _eStat) { if (_iR < 0 || _iC < 0 || _iR > m_iMaxRow || _iC > m_iMaxCol) { return(false); } m_tChips[_iC, _iR].Stat = _eStat; OnChange(); return(true); }
public bool IsExist(cs Stat) { for (int r = 0; r < m_iMaxRow; r++) { if (GetCntRowStat(r, Stat) != 0) { return(true); } } return(false); }
public bool CheckAllStatRow(cs Stat, int r) { for (int c = 0; c < m_iMaxCol; c++) { if (!m_bNotUse[c, r] && !CheckStat(c, r, Stat)) { return(false); } } return(true); }
//Get Row Count by m_tChipstatus. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public int GetCntRowStat(int r, cs Stat) { int iCnt = 0; for (int c = 0; c < m_iMaxCol; c++) { if (CheckStat(c, r, Stat)) { iCnt++; } } return(iCnt); }
//Get Col Count by m_tChipstatus. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public int GetCntColStat(int c, cs Stat) { int iCnt = 0; for (int r = 0; r < m_iMaxRow; r++) { if (CheckStat(c, r, Stat)) { iCnt++; } } return(iCnt); }
protected override Parser.Result Evaluate(string data, ref int from) { var list = Utils.GetFunctionArgs(data, ref from, ParaCnt); uint.TryParse(list[0], out uint arg1); int.TryParse(list[1], out int arg2); int.TryParse(list[2], out int arg3); cs status = DM.ARAY[arg1].GetStat(arg2, arg3); Interpreter.Instance.AppendOutput("Data_Get(" + arg1.ToString() + ", " + arg2.ToString() + ", " + arg3.ToString() + ") = " + status.ToString()); return(new Parser.Result((int)status, null, null)); }
static void Main(string[] args) { cs cal = new cs(); double a, b; Console.WriteLine("Enter First Num: "); a = double.Parse(Console.ReadLine()); Console.WriteLine("Enter Second Num: "); b = double.Parse(Console.ReadLine()); Console.WriteLine("Summation = {0}\nDifference = {1}\nMultiplication = {2}", cs.adds(a, b), cal.subs(a, b), cs.muls(a, b)); Console.ReadLine(); }
public void ChangeStat(cs _eFrom, cs _eTo) { for (int r = 0; r < m_iMaxRow; r++) { for (int c = 0; c < m_iMaxCol; c++) { if (m_tChips[c, r].Stat == _eFrom) { m_tChips[c, r].Stat = _eTo; } } } OnChange(); }
//인터페이스 상속 끝.================================================== #endregion //밑에 부터 작업. public bool FindChip(int _iId, out int c, out int r, cs _iChip = cs.RetFail) { c = 0; r = 0; _iId = 0; DM.ARAY[_iId].FindFrstColLastRow((cs)_iChip, ref c, ref r); //if(-1 != DM.ARAY[ri.WLDT].FindLastRow(_iChip)){ // _iId = ri.WLDT ; // r = DM.ARAY[ri.WLDT].FindLastRow(_iChip) ; // return true ; //} //else if(-1 != DM.ARAY[ri.WLDB].FindLastRow(_iChip)){ // _iId = ri.WLDB ; // r = DM.ARAY[ri.WLDB].FindLastRow(_iChip) ; // return true ; //} //if(_iChip == cs.RetFail) { // DM.ARAY[ri.WSTG].FindLastRowCol(cs.Empty , ref c , ref r); // _iId = ri.WSTG ; // if(r<0 || c<0){ // r=0; // c=0; // } // else { // if (c+1 <= OM.DevInfo.iWFER_DieCntX) // { // if(r < OM.DevInfo.iWFER_DieCntY-1) { // r++; // } // else { // r = OM.DevInfo.iWFER_DieCntY-1; // } // // c = 0; // } // else // { // c++; // } // } // return true ; //} //나머지는 해당 칩을 찾아서 리턴. //DM.ARAY[ri.WSTG].FindLastRowCol(_iChip , ref c , ref r); //_iId = ri.WSTG ; return((c >= 0 && r >= 0) ? true : false); //return false; }
public bool CheckAllStat(cs Stat) { for (int r = 0; r < m_iMaxRow; r++) { for (int c = 0; c < m_iMaxCol; c++) { if (!CheckStat(c, r, Stat)) { return(false); } } } return(true); }
public bool FindFrstColRow(cs _eStat, ref int _iC, ref int _iR) { //Local Var. for (int c = 0; c < m_iMaxCol; c++) { for (int r = 0; r < m_iMaxRow; r++) { if (FindChip(_eStat, c, r)) { _iR = r; _iC = c; return(true); } } } //No Find. _iR = -1; _iC = -1; return(false); }
public bool FindLastRowCol(cs _eStat, ref int _iC, ref int _iR) { for (int r = m_iMaxRow - 1; r >= 0; r--) { for (int c = m_iMaxCol - 1; c >= 0; c--) { if (FindChip(_eStat, c, r)) { _iR = r; _iC = c; return(true); } } } //No Find. _iR = -1; _iC = -1; return(false); }
public string GetGameBoardView() { string resultat = ""; resultat = resultat + "Y\n"; resultat = resultat + " *******************\n"; D : \ SkoleDM \ Projekt programering \ spil \ spil \ TicTacToe.cs resultat = resultat + " * * * *\n"; resultat = resultat + "3 * " + GameBoard[0, 2] + " * " + GameBoard[1, 2] + " * " + GameBoard[2, 2] + " *\n"; resultat = resultat + " * * * *\n"; resultat = resultat + " *******************\n"; resultat = resultat + " * * * *\n"; resultat = resultat + "2 * " + GameBoard[0, 1] + " * " + GameBoard[1, 1] + " * " + GameBoard[2, 1] + " *\n"; resultat = resultat + " * * * *\n"; resultat = resultat + " *******************\n"; resultat = resultat + " * * * *\n"; resultat = resultat + "1 * " + GameBoard[0, 0] + " * " + GameBoard[1, 0] + " * " + GameBoard[2, 0] + " *\n"; resultat = resultat + " * * * *\n"; resultat = resultat + " *******************\n"; resultat = resultat + " 1 2 3 X\n"; return(resultat); }
public void SetStat(cs _eStat) { String sHead = "SetStatAll " + m_sName; //Trace( sHead.c_str() , String(_eStat).c_str()); for (int r = 0; r < m_iMaxRow; r++) { for (int c = 0; c < m_iMaxCol; c++) { m_tChips[c, r].Stat = _eStat; } } if (_eStat == cs.None) { m_iStep = 0; m_iSubStep = 0; } OnChange(); }
public bool FindFrstColLastRow_Indx(cs _eStat, int iStrCol, int iEndCol, ref int _iC, ref int _iR) { if (iStrCol >= m_iMaxCol) { _iR = -1; _iC = -1; return(false); } if (iStrCol >= m_iMaxCol) { _iR = -1; _iC = -1; return(false); } if (iEndCol < 0) { _iR = -1; _iC = -1; return(false); } if (iEndCol < 0) { _iR = -1; _iC = -1; return(false); } //Local Var. for (int c = iStrCol; c <= iEndCol; c++) { for (int r = m_iMaxRow - 1; r >= 0; r--) { if (FindChip(_eStat, c, r)) { _iR = r; _iC = c; return(true); } } } //No Find. _iR = -1; _iC = -1; return(false); }
public bool FindFrstRowLastCol_Indx(cs _eStat, int iStrCol, int iEndCol, ref int _iC, ref int _iR) { if (iStrCol >= m_iMaxCol) { _iR = -1; _iC = -1; return(false); } if (iStrCol >= m_iMaxCol) { _iR = -1; _iC = -1; return(false); } if (iEndCol < 0) { _iR = -1; _iC = -1; return(false); } if (iEndCol < 0) { _iR = -1; _iC = -1; return(false); } for (int r = 0; r < m_iMaxRow; r++) { for (int c = iEndCol; c >= iStrCol; c--) { if (FindChip(_eStat, c, r)) { _iR = r; _iC = c; return(true); } } } //No Find. _iR = -1; _iC = -1; return(false); }
public bool RangeSetStat(int _iSc, int _iSr, int _iEc, int _iEr, cs _eStat) { if (_iSr < 0 || _iSc < 0 || _iSr >= m_iMaxRow || _iSc >= m_iMaxCol) { return(false); } if (_iEr < 0 || _iEc < 0 || _iEr >= m_iMaxRow || _iEc >= m_iMaxCol) { return(false); } if (_iSr > _iEr || _iSc > _iEc) { return(false); } for (int r = _iSr; r <= _iEr; r++) { for (int c = _iSc; c <= _iEc; c++) { m_tChips[c, r].Stat = _eStat; } } OnChange(); return(true); }
public static extern int mono_union_test_1 (cs a);
//Search Chip. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public bool FindChip(cs _eStat, int _iC, int _iR) { bool bRet = CheckStat(_iC, _iR, _eStat); return(bRet); }