public static Raya getInstancia() { if (Instancia == null) { Instancia = new Raya(); } return(Instancia); }
private void pb10_Click(object sender, EventArgs e) { String respuesta = Raya.getInstancia().marcar(1, 0, lblturno.Text[0]); if (lblturno.Text == "X") { pb10.Image = new System.Drawing.Bitmap("C:\\Users\\Estudiante\\programacion-3\\x.png"); } else { pb10.Image = new System.Drawing.Bitmap("C:\\Users\\Estudiante\\programacion-3\\o.png"); } }
private void btnreiniciar_Click(object sender, EventArgs e) { Raya.getInstancia().Reiniciar(); pb00.Image = null; pb01.Image = null; pb02.Image = null; pb10.Image = null; pb11.Image = null; pb12.Image = null; pb20.Image = null; pb21.Image = null; pb22.Image = null; lblturno.Text = "X"; }