You've already forked lazarus-ccr
The question words in TappyWords are now constantly changing.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2093 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -78,7 +78,8 @@ procedure TformConfig.btnLoadClick(Sender: TObject);
|
||||
begin
|
||||
SetCurrentModule(comboGameType.ItemIndex);
|
||||
formTappyTuxGame.Show;
|
||||
GetCurrentModule().StartNewGame(comboSound.ItemIndex, comboMusic.ItemIndex, comboLevel.ItemIndex);
|
||||
GetCurrentModule().StartNewGame(comboSound.ItemIndex, comboMusic.ItemIndex,
|
||||
comboLevel.ItemIndex, ltbWordlist.ItemIndex);
|
||||
|
||||
Hide;
|
||||
end;
|
||||
|
@ -109,10 +109,79 @@ object formTappyTuxGame: TformTappyTuxGame
|
||||
Top = 200
|
||||
Width = 130
|
||||
Lines.Strings = (
|
||||
'[TESTE]'
|
||||
'Palavras escritas:'
|
||||
''
|
||||
'cachorro'
|
||||
'gato'
|
||||
'peixe'
|
||||
'pássaro'
|
||||
'macaco'
|
||||
'leão'
|
||||
'tigre'
|
||||
'elefante'
|
||||
'crocodilo'
|
||||
'abelha'
|
||||
'mosca'
|
||||
'água-viva'
|
||||
'tartaruga'
|
||||
'lagartixa'
|
||||
'sapo'
|
||||
'minhoca'
|
||||
'centopéia'
|
||||
'rinoceronte'
|
||||
'coiote'
|
||||
'águia'
|
||||
'canguru'
|
||||
'coala'
|
||||
'morcego'
|
||||
'gavião'
|
||||
'pavão'
|
||||
'cobra'
|
||||
'camelo'
|
||||
'lontra'
|
||||
'tubarão'
|
||||
'coelho'
|
||||
'baleia'
|
||||
'urso'
|
||||
'foca'
|
||||
'escorpião'
|
||||
'touro'
|
||||
'vaca'
|
||||
'galinha'
|
||||
'formiga'
|
||||
'borboleta'
|
||||
'girafa'
|
||||
'arara'
|
||||
'salamandra'
|
||||
'rã'
|
||||
'pinguim'
|
||||
'tatu'
|
||||
'avestruz'
|
||||
'hiena'
|
||||
'pelicano'
|
||||
'pombo'
|
||||
'orangotango'
|
||||
'coruja'
|
||||
'papagaio'
|
||||
'tucano'
|
||||
'ornitorrinco'
|
||||
'gambá'
|
||||
'rato'
|
||||
'esquilo'
|
||||
'golfinho'
|
||||
'ovelha'
|
||||
'morsa'
|
||||
'suricato'
|
||||
'ornitorrinco'
|
||||
'toupeira'
|
||||
'barata'
|
||||
'lula'
|
||||
'polvo'
|
||||
'tamanduá'
|
||||
'camarão'
|
||||
'lêmure'
|
||||
'besouro'
|
||||
'onça'
|
||||
)
|
||||
OnChange = TestChange
|
||||
TabOrder = 5
|
||||
Visible = False
|
||||
end
|
||||
@ -123,7 +192,7 @@ object formTappyTuxGame: TformTappyTuxGame
|
||||
Width = 82
|
||||
ReadOnly = True
|
||||
TabOrder = 6
|
||||
Text = 'Melancia'
|
||||
Text = 'Question'
|
||||
end
|
||||
object Question2: TEdit
|
||||
Left = 216
|
||||
@ -132,7 +201,7 @@ object formTappyTuxGame: TformTappyTuxGame
|
||||
Width = 80
|
||||
ReadOnly = True
|
||||
TabOrder = 7
|
||||
Text = 'Abacate'
|
||||
Text = 'Question'
|
||||
end
|
||||
object Question4: TEdit
|
||||
Left = 320
|
||||
@ -141,7 +210,7 @@ object formTappyTuxGame: TformTappyTuxGame
|
||||
Width = 80
|
||||
ReadOnly = True
|
||||
TabOrder = 8
|
||||
Text = 'Cereja'
|
||||
Text = 'Question'
|
||||
end
|
||||
object Question3: TEdit
|
||||
Left = 424
|
||||
@ -150,7 +219,7 @@ object formTappyTuxGame: TformTappyTuxGame
|
||||
Width = 80
|
||||
ReadOnly = True
|
||||
TabOrder = 9
|
||||
Text = 'Melão'
|
||||
Text = 'Question'
|
||||
end
|
||||
object Question5: TEdit
|
||||
Left = 528
|
||||
@ -159,7 +228,7 @@ object formTappyTuxGame: TformTappyTuxGame
|
||||
Width = 80
|
||||
ReadOnly = True
|
||||
TabOrder = 10
|
||||
Text = 'Laranja'
|
||||
Text = 'Question'
|
||||
end
|
||||
object GameOver: TToggleBox
|
||||
Left = 240
|
||||
|
@ -36,6 +36,7 @@ type
|
||||
procedure AnswerKeyPress(Sender: TObject; var Key: char);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure NoClick(Sender: TObject);
|
||||
procedure TestChange(Sender: TObject);
|
||||
procedure YesClick(Sender: TObject);
|
||||
|
||||
private
|
||||
@ -95,6 +96,11 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TformTappyTuxGame.TestChange(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TformTappyTuxGame.YesClick(Sender: TObject);
|
||||
begin
|
||||
Question1.Top := 24;
|
||||
@ -104,7 +110,8 @@ begin
|
||||
Question5.Top := 24;
|
||||
GetCurrentModule().StartNewGame(formConfig.comboSound.ItemIndex,
|
||||
formConfig.comboMusic.ItemIndex,
|
||||
formConfig.comboLevel.ItemIndex);
|
||||
formConfig.comboLevel.ItemIndex,
|
||||
formConfig.ltbWordlist.ItemIndex);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ type
|
||||
constructor Create; override;
|
||||
procedure TranslateTextsToEnglish; override;
|
||||
procedure TranslateTextsToPortuguese; override;
|
||||
procedure StartNewGame(SndFX: Integer; Music: Integer; Level: Integer); override;
|
||||
procedure StartNewGame(SndFX: Integer; Music: Integer; Level: Integer; QuestionList: Integer); override;
|
||||
procedure Answered(); override;
|
||||
procedure EndGame(); override;
|
||||
end;
|
||||
@ -46,7 +46,7 @@ begin
|
||||
ShortDescription := 'TappyMath - Um jogo para aprender aritmética';
|
||||
end;
|
||||
|
||||
procedure TTappyMath.StartNewGame(SndFX: Integer; Music: Integer; Level: Integer);
|
||||
procedure TTappyMath.StartNewGame(SndFX: Integer; Music: Integer; Level: Integer; QuestionList: Integer);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
@ -23,6 +23,9 @@ type
|
||||
gameSLevel : Integer;
|
||||
gameSndFX : Boolean;
|
||||
gameMusic : Boolean;
|
||||
gameQuestionList : Integer;
|
||||
gameFile : Text;
|
||||
aux : string;
|
||||
timerWords: TTimer;
|
||||
{newGame : TTappyGameData;}
|
||||
procedure HandleOnTimer(Sender: TObject);
|
||||
@ -31,7 +34,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure TranslateTextsToEnglish; override;
|
||||
procedure TranslateTextsToPortuguese; override;
|
||||
procedure StartNewGame(SndFX: Integer; Music: Integer; Level: Integer); override;
|
||||
procedure StartNewGame(SndFX: Integer; Music: Integer; Level: Integer; QuestionList: Integer); override;
|
||||
procedure Answered(); override;
|
||||
procedure EndGame(); override;
|
||||
end;
|
||||
@ -57,6 +60,7 @@ begin
|
||||
formTappyTuxGame.Lives.Text := IntToStr(gameLives);
|
||||
if (gameLives = 0) then EndGame();
|
||||
formTappyTuxGame.Question1.Top:= 24;
|
||||
formTappyTuxGame.Question1.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
end;
|
||||
|
||||
if ((formTappyTuxGame.Question2.Top >= 370)) then
|
||||
@ -65,6 +69,7 @@ begin
|
||||
formTappyTuxGame.Lives.Text := IntToStr(gameLives);
|
||||
if (gameLives = 0) then EndGame();
|
||||
formTappyTuxGame.Question2.Top:= 24;
|
||||
formTappyTuxGame.Question2.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
end;
|
||||
|
||||
if ((formTappyTuxGame.Question3.Top >= 370)) then
|
||||
@ -73,6 +78,7 @@ begin
|
||||
formTappyTuxGame.Lives.Text := IntToStr(gameLives);
|
||||
if (gameLives = 0) then EndGame();
|
||||
formTappyTuxGame.Question3.Top:= 24;
|
||||
formTappyTuxGame.Question3.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
end;
|
||||
|
||||
if ((formTappyTuxGame.Question4.Top >= 370)) then
|
||||
@ -81,6 +87,7 @@ begin
|
||||
formTappyTuxGame.Lives.Text := IntToStr(gameLives);
|
||||
if (gameLives = 0) then EndGame();
|
||||
formTappyTuxGame.Question4.Top:= 24;
|
||||
formTappyTuxGame.Question4.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
end;
|
||||
|
||||
if ((formTappyTuxGame.Question5.Top >= 370)) then
|
||||
@ -89,6 +96,7 @@ begin
|
||||
formTappyTuxGame.Lives.Text := IntToStr(gameLives);
|
||||
if (gameLives = 0) then EndGame();
|
||||
formTappyTuxGame.Question5.Top:= 24;
|
||||
formTappyTuxGame.Question5.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
end;
|
||||
|
||||
|
||||
@ -124,7 +132,7 @@ begin
|
||||
ShortDescription := 'TappyWords - Um jogo para aprender a digitar e ortografia';
|
||||
end;
|
||||
|
||||
procedure TTappyWords.StartNewGame(SndFX: Integer; Music: Integer; Level: Integer);
|
||||
procedure TTappyWords.StartNewGame(SndFX: Integer; Music: Integer; Level: Integer; QuestionList: Integer);
|
||||
begin
|
||||
|
||||
//Causam "External: SIGSEGV"
|
||||
@ -151,6 +159,22 @@ begin
|
||||
formTappyTuxGame.Score.Text := IntToStr(gameScore);
|
||||
formTappyTuxGame.Lives.Text := IntToStr(gameLives);
|
||||
|
||||
formTappyTuxGame.Question1.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
formTappyTuxGame.Question2.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
formTappyTuxGame.Question3.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
formTappyTuxGame.Question4.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
formTappyTuxGame.Question5.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
|
||||
//gameQuestionList := QuestionList;
|
||||
//if gameQuestionList < 0 then gameQuestionList := 0;
|
||||
//Assign(gameFile, {IntToStr(gameQuestionList)}'4.txt')
|
||||
//gameFile := SearchFile;
|
||||
//Reset(gameFile);
|
||||
//Readln(gameFile, aux);
|
||||
//formTappyTuxGame.Question1.Text := aux;
|
||||
|
||||
//Assign(gameFile, gameQuestionList+'.txt');
|
||||
|
||||
end;
|
||||
|
||||
procedure TTappyWords.Answered;
|
||||
@ -158,6 +182,7 @@ begin
|
||||
if (formTappyTuxGame.Answer.Text = formTappyTuxGame.Question1.Text) then
|
||||
begin
|
||||
formTappyTuxGame.Question1.Top := 24;
|
||||
formTappyTuxGame.Question1.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
gameScore := gameScore +1;
|
||||
gameLevel := (gameScore div 20) + gameSLevel;
|
||||
formTappyTuxGame.Score.Text := IntToStr(gameScore);
|
||||
@ -166,6 +191,7 @@ begin
|
||||
if (formTappyTuxGame.Answer.Text = formTappyTuxGame.Question2.Text) then
|
||||
begin
|
||||
formTappyTuxGame.Question2.Top := 24;
|
||||
formTappyTuxGame.Question2.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
gameScore := gameScore +1;
|
||||
gameLevel := (gameScore div 20) + gameSLevel;
|
||||
formTappyTuxGame.Score.Text := IntToStr(gameScore);
|
||||
@ -174,6 +200,7 @@ begin
|
||||
if (formTappyTuxGame.Answer.Text = formTappyTuxGame.Question3.Text) then
|
||||
begin
|
||||
formTappyTuxGame.Question3.Top := 24;
|
||||
formTappyTuxGame.Question3.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
gameScore := gameScore +1;
|
||||
gameLevel := (gameScore div 20) + gameSLevel;
|
||||
formTappyTuxGame.Score.Text := IntToStr(gameScore);
|
||||
@ -182,6 +209,7 @@ begin
|
||||
if (formTappyTuxGame.Answer.Text = formTappyTuxGame.Question4.Text) then
|
||||
begin
|
||||
formTappyTuxGame.Question4.Top := 24;
|
||||
formTappyTuxGame.Question4.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
gameScore := gameScore +1;
|
||||
gameLevel := (gameScore div 20) + gameSLevel;
|
||||
formTappyTuxGame.Score.Text := IntToStr(gameScore);
|
||||
@ -190,6 +218,7 @@ begin
|
||||
if (formTappyTuxGame.Answer.Text = formTappyTuxGame.Question5.Text) then
|
||||
begin
|
||||
formTappyTuxGame.Question5.Top := 24;
|
||||
formTappyTuxGame.Question5.Text := formTappyTuxGame.Test.Lines.Strings[random(71)];
|
||||
gameScore := gameScore +1;
|
||||
gameLevel := (gameScore div 20) + gameSLevel;
|
||||
formTappyTuxGame.Score.Text := IntToStr(gameScore);
|
||||
|
@ -24,7 +24,7 @@ type
|
||||
procedure TranslateTextsToEnglish; virtual;
|
||||
procedure TranslateTextsToPortuguese; virtual;
|
||||
procedure InitModule(); virtual;
|
||||
procedure StartNewGame(SndFX: Integer; Music: Integer; Level: Integer); virtual; abstract;
|
||||
procedure StartNewGame(SndFX: Integer; Music: Integer; Level: Integer; QuestionList: Integer); virtual; abstract;
|
||||
procedure Answered(); virtual; abstract;
|
||||
procedure EndGame(); virtual; abstract;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user