Skip to content

Commit

Permalink
Habilitando o btn Reiniciar
Browse files Browse the repository at this point in the history
habilitando botao reinicair
  • Loading branch information
beritcarvalho committed Apr 11, 2021
1 parent 1413438 commit 6a044e3
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
Binary file modified .vs/blackjack2.0/v16/.suo
Binary file not shown.
26 changes: 13 additions & 13 deletions blackjack2.0/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions blackjack2.0/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public partial class Form1 : Form
public Form1()
{
InitializeComponent();
btnReiniciar.Enabled = false;
lblReiniciar.ForeColor = Color.Gray;
}


Expand Down Expand Up @@ -293,6 +295,10 @@ public static int PedirCartas(PictureBox carta)
int pontosP1 = 0;
private void btnPedirMaisP1_Click(object sender, EventArgs e)
{
//habilitando o botao Reiniciar!
btnReiniciar.Enabled = true;
lblReiniciar.ForeColor = Color.Black;

//mostrando carta e atribuindo o valor da variavel cartaAtual
int cartaAtual = PedirCartas(pibCartasP1);
lblValorCartaP1.Text = cartaAtual.ToString();
Expand All @@ -310,11 +316,11 @@ private void Resultado(int pontos, Label lblpontos)
{
if (pontos > 21)
{
lblpontos.Text = "VOCÊ PERDEU!!!";
lblpontos.Text = "ESTOUROU";
}
else if (pontosP1 == 21)
{
lblpontos.Text = "VOCÊ GANHOU!!!";
lblpontos.Text = "GANHOU!!!";
}
}

Expand Down
Binary file modified blackjack2.0/bin/Debug/netcoreapp3.1/blackjack2.0.dll
Binary file not shown.
Binary file modified blackjack2.0/bin/Debug/netcoreapp3.1/blackjack2.0.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified blackjack2.0/obj/Debug/netcoreapp3.1/blackjack2.0.dll
Binary file not shown.
Binary file modified blackjack2.0/obj/Debug/netcoreapp3.1/blackjack2.0.pdb
Binary file not shown.

0 comments on commit 6a044e3

Please sign in to comment.