Rev 24 | Rev 26 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 24 | Rev 25 | ||
---|---|---|---|
Line 217... | Line 217... | ||
217 | Statistics.Panels.Items[0].Text := Format(LNG_TIME, [LevelTime]); |
217 | Statistics.Panels.Items[0].Text := Format(LNG_TIME, [LevelTime]); |
218 | end; |
218 | end; |
219 | 219 | ||
220 | procedure TMainForm.RefreshStonesRemoved; |
220 | procedure TMainForm.RefreshStonesRemoved; |
221 | resourcestring |
221 | resourcestring |
222 | LNG_STONES_REMOVED = '%d of %d stones removed'; |
222 | LNG_STONES_REMOVED = '%d of %d stones removed'; // Jumping stone not counted |
223 | begin |
223 | begin |
224 | Statistics.Panels.Items[1].Text := Format(LNG_STONES_REMOVED, [LevelRemovedStones, LevelTotalStones-1]); |
224 | Statistics.Panels.Items[1].Text := Format(LNG_STONES_REMOVED, [LevelRemovedStones, LevelTotalStones-1]); |
225 | end; |
225 | end; |
226 | 226 | ||
227 | procedure TMainForm.RefreshPoints; |
227 | procedure TMainForm.RefreshPoints; |
Line 507... | Line 507... | ||
507 | Close; |
507 | Close; |
508 | end; |
508 | end; |
509 | end; |
509 | end; |
510 | 510 | ||
511 | function TMainForm.GoalStatus: TGoalStatus; |
511 | function TMainForm.GoalStatus: TGoalStatus; |
512 | var |
- | |
513 | ft: TFieldType; |
- | |
514 | begin |
- | |
515 | if not PlaygroundMatrix.MatrixHasGoal then |
- | |
516 | result := gsNoGoal |
- | |
517 | else if LevelRemovedStones < LevelTotalStones-1 then |
- | |
518 | Result := gsMultipleStonesRemaining |
- | |
519 | else |
- | |
520 | begin |
512 | begin |
521 | ft := PlaygroundMatrix.GoalFieldType; |
513 | result := PlaygroundMatrix.GoalStatus(LevelTotalStones - LevelRemovedStones); |
522 | if ft = ftRed then |
- | |
523 | result := gsLastStoneInGoalRed |
- | |
524 | else if ft = ftYellow then |
- | |
525 | result := gsLastStoneInGoalYellow |
- | |
526 | else if ft = ftGreen then |
- | |
527 | result := gsLastStoneInGoalGreen |
- | |
528 | else |
- | |
529 | result := gsUndefined; |
- | |
530 | end; |
- | |
531 | end; |
514 | end; |
532 | 515 | ||
533 | procedure TMainForm.FormCreate(Sender: TObject); |
516 | procedure TMainForm.FormCreate(Sender: TObject); |
534 | begin |
517 | begin |
535 | JumpHistory := TStringList.Create; |
518 | JumpHistory := TStringList.Create; |