private void Form1_MouseClick(object sender, MouseEventArgs e) { Image img = Properties.Resources._2;//双引号里是图片的路径 this.BackgroundImage = img; IconPic.Visible = true; PassTxtBox.Visible = true; PassPic.Visible = true; PassTxtBox.Text = ""; NickNameLbl.Visible = true; TimeLbl.Visible = false; DateLbl.Visible = false; Lbl.Visible = false; PassPanel.Show(); }
private void ConfrimBt_Click(object sender, EventArgs e) { TipPanel.Hide(); PassTxtBox.Text = ""; PassPanel.Show(); }
private IEnumerator CoroutineMain() { while (!isOver) { //合法手ある if (board.ExistsMovablePoint()) { board.Render(); yield return(new WaitForSeconds(0.5f)); board.OnTurn(); yield return(new WaitWhile(() => board.IsThinking)); } else //合法手がない { board.Pass(); board.Next(); //相手も合法手がない。ゲームオーバー if (!board.ExistsMovablePoint()) { isOver = true; resultPanel.SetActive(true); var scores = board.CountScore(); int b = (int)Stone.ColorType.Black; int w = (int)Stone.ColorType.White; int d = scores[b] - scores[w]; if (d > 0) { resultPanel.Show(b); } else if (d < 0) { resultPanel.Show(w); } else { resultPanel.Show(2); } yield break; } else { board.Previous(); //相手は合法手がある } passPanel.SetActive(true); passPanel.Show(board.CurrentPlayer.Color); yield return(new WaitForSeconds(0.5f)); passPanel.SetActive(false); } board.Next(); } yield return(null); }