Ir ao conteúdo
  • Cadastre-se

santos100

Membro Júnior
  • Posts

    2
  • Cadastrado em

  • Última visita

Reputação

1
  1. Eu estou fazendo um quiz no Delphi, sou iniciante, preciso da vossa ajuda. 1º : Quero ajuda para adicionar ao meu jogo como adicionar pontos cada vez que o jogador acertar a resposta correta. 2º : Ajuda também aqui: Se o jogador não concluir o nível, então na 3ª tentativa ele perde todos os pontos. Então me ajudem como fazer isso no Delphi. Com essas duas características mencionadas Aqui o código (vai ter vários forms com perguntas sobre temas variados, como o quiz "Show do milhão") : Unit U_quiz; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.UITypes, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.jpeg, Vcl.ExtCtrls; type Tfrm_nivel1 = class(TForm) Label1: TLabel; rb_um: TRadioButton; rd_dois: TRadioButton; rb_tres: TRadioButton; lb_dois: TLabel; rb_quatro: TRadioButton; rb_cinco: TRadioButton; rb_seis: TRadioButton; Label2: TLabel; RadioButton1: TRadioButton; RadioButton2: TRadioButton; RadioButton3: TRadioButton; Label3: TLabel; RadioButton4: TRadioButton; RadioButton5: TRadioButton; RadioButton6: TRadioButton; Label4: TLabel; RadioButton7: TRadioButton; RadioButton8: TRadioButton; RadioButton9: TRadioButton; Image1: TImage; procedure rb_umClick(Sender: TObject); procedure rd_doisClick(Sender: TObject); procedure rb_tresClick(Sender: TObject); procedure rb_quatroClick(Sender: TObject); procedure rb_cincoClick(Sender: TObject); procedure rb_seisClick(Sender: TObject); procedure RadioButton4Click(Sender: TObject); procedure RadioButton5Click(Sender: TObject); procedure RadioButton6Click(Sender: TObject); procedure RadioButton9Click(Sender: TObject); procedure RadioButton7Click(Sender: TObject); procedure RadioButton8Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frm_nivel1: Tfrm_nivel1; implementation {$R *.dfm} procedure Tfrm_nivel1.rb_tresClick(Sender: TObject); var c:Boolean; begin c:= not false; if c=true then c:= (true); Messagedlg('Acertou! Você ganhou 30 pontos!',mtInformation,[mbOk],0); end; procedure Tfrm_nivel1.rb_umClick(Sender: TObject); var a: Boolean; begin a:= not true; if a=true then a:= (false); Messagedlg('Errou! Tente outra vez!',mtInformation,[mbOk],0); end; procedure Tfrm_nivel1.rd_doisClick(Sender: TObject); var b: Boolean; begin b:= not true; if b=true then b:= (false); Messagedlg('Errou! Tente outra vez!',mtInformation,[mbOk],0);

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!