石头剪刀布游戏画框不变

时间:2019-05-10 12:13:46

标签: vb.net visual-studio-2010

因此,我正在制作剪刀石头布游戏,并且有图片框代表玩家和计算机选择的内容。因此,我总共有6个图片框。我有3个按钮,此人必须单击以拾取石头,纸张或剪刀。   这是与图片框有关的一个按钮的代码。一切似乎都正确,但是每当我按下按钮来选择石头,纸张或剪刀时,图片就会变成石头,而不会改变为其他任何东西。我有3个按钮,此人必须单击以拾取石头,纸张或剪刀。

If Label2.Text = "You Won with scissors.  I will get my revenge!" Then paper1.Visible = True

If Label2.Text = "Ha! I win this time, your paper has been cut!" Then Skissors1.Visible = True

If Label2.Text = "oh... A tie, 2 scissors." Then Skissors1.Visible = True

If Label2.Text = "You Won with scissors.  I will get my revenge!" Then Skissors1.Visible = True

If Label2.Text = "Ha! I win this time, your paper has been cut!" Then paper2.Visible = True

If Label2.Text = "oh... A tie, 2 scissors." Then skissors2.Visible = True


    If Rock1.Visible = True Then paper1.Visible = False
    If Rock1.Visible = True Then Skissors1.Visible = False
    If paper1.Visible = True Then Rock1.Visible = False
    If paper1.Visible = True Then Skissors1.Visible = False
    If Skissors1.Visible = True Then paper1.Visible = False
    If Skissors1.Visible = True Then Rock1.Visible = False
    If rock2.Visible = True Then paper2.Visible = False
    If rock2.Visible = True Then skissors2.Visible = False
    If paper2.Visible = True Then rock2.Visible = False
    If paper2.Visible = True Then skissors2.Visible = False
    If skissors2.Visible = True Then paper2.Visible = False
    If skissors2.Visible = True Then rock2.Visible = False

0 个答案:

没有答案