/// <summary> /// 反転 /// </summary> public void Reverse() { if (this.m_viewColor == Proc.ViewColor.Black) { this.m_viewColor = Proc.ViewColor.White; } else if (this.m_viewColor == Proc.ViewColor.White) { this.m_viewColor = Proc.ViewColor.Black; } paintCircle(); }
/// <summary> /// 表示色一覧取得処理 /// </summary> /// <returns>表示色一覧</returns> private Proc.ViewColor[,] getViewColor() { Proc.ViewColor[,] viewColor = new Proc.ViewColor[8, 8]; for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { viewColor[i, j] = this.m_lstCircle[i, j]._ViewColor; } } return(viewColor); }
/// <summary> /// 各枠クリックイベント /// </summary> /// <param name="sender">オブジェクト</param> /// <param name="e">イベント</param> private void circle_Click(object sender, EventArgs e) { // かつプレー中のみ有効 if (this.m_playState == Proc.PlayState.Play) { Circle circle = (Circle)sender; string[] strTagData = circle.Tag.ToString().Split(new char[] { ',' }); // タグ情報によって石状態を取得 int iX = int.Parse(strTagData[0]); int iY = int.Parse(strTagData[1]); if (!this.m_proc.ClickProc(getViewColor(), iX, iY)) { MessageBox.Show(this.m_proc._ErrMsg, "ERROR"); } else { // 石を置く Proc.ViewColor color = Proc.ViewColor.None; if (this.m_proc._Turn == Proc.Turn.Black) { color = Proc.ViewColor.Black; } else { color = Proc.ViewColor.White; } this.m_lstCircle[iX, iY].InitView(color); // ターン変更 this.turnLabel.Text = this.m_proc.ReverseTurn(); // 終了確認を行う if (this.m_proc.FinCheck(getViewColor())) { // 終了処理 finProc(); } } } }
/// <summary> /// 初回表示 /// </summary> /// <param name="viewColor">色</param> public void InitView(Proc.ViewColor viewColor) { this.m_viewColor = viewColor; paintCircle(); }
/// <summary> /// リセット表記 /// </summary> public void Reset() { this.m_viewColor = Proc.ViewColor.None; paintCircle(); }