八个格子中随机停下来,老虎机能在前半部分速度越来越快,后半部分速度越开越慢 switch (i)
{
case 1:
button2.BackColor = Color.Red; //变红
button9.BackColor = Color.Gray;break;//变灰
case 2:
button2.BackColor = Color.Gray;
button3.BackColor = Color.Red; break;
case 3:
button3.BackColor = Color.Gray;
button4.BackColor = Color.Red; break;
case 4:
button4.BackColor = Color.Gray;
button5.BackColor = Color.Red; break;
case 5:
button5.BackColor = Color.Gray;
button6.BackColor = Color.Red; break;
case 6:
button6.BackColor = Color.Gray;
button7.BackColor = Color.Red; break;
case 7:
button7.BackColor = Color.Gray;
button8.BackColor = Color.Red; break;
case 8:
button8.BackColor = Color.Gray;
button9.BackColor = Color.Red; break;
case 9:
button9.BackColor = Color.Gray;
button2.BackColor = Color.Red; break;
}
评论