private void Form1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar >= '1' && e.KeyChar <= '9') { score += iwashi.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxEsaS); score += utubo.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxEsaL); score += ankou.Eat(int.Parse(e.KeyChar.ToString()), pictureBoxEsaM); labelScore.Text = "得点:" + score; } }
private void Form1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar >= '1' && e.KeyChar <= '9') { int point = int.Parse(e.KeyChar.ToString()); score += ankou.Eat(point, pictureBoxBaitM); score += iwashi.Eat(point, pictureBoxBaitS); score += utubo.Eat(point, pictureBoxBaitL); labelScore.Text = score.ToString(); } }