Commit Graph

7 Commits

Author SHA1 Message Date
Ian Wadham
212cc206b9 docs: Klondike Tutorial Step 5 (#2842)
Primarily this PR is completing Step 5 of Flame's Klondike Tutorial and removing the tbc.md file ("To be continued...").

As at the end of Step 4, the Klondike Game had no animation, other than the drag-and-drop moves to play the game. It also had no ways to detect a win, react to a win or play again without re-loading and re-running the whole app. Step 4 played the Klondike Draw 3 variation of Klondike. Step 5 introduces the easier Klondike Draw 1 variation and provides buttons to:

Choose between Draw 1 and Draw 3,

Start the game again with a new deal, or

Start again with the same deal as before.

The new code and step5.md tutorial text cover Effects and EffectControllers in some detail, with complex examples of their use. The animations include:

Returning dropped but misplaced cards to the places they came from,

Settling dropped and validly placed cards into position,

Flipping cards from Stock Pile to Waste Pile,

Turning cards over on the Tableau piles when the cards above them are moved away,

Collecting multiple cards when the game is over,

Dealing and re-dealing multiple cards,

Allowing a card to be auto-moved onTapUp() to its Foundation Pile if it is ready to go out,

Providing a display of moving cards when/if the player wins.
2023-11-24 07:27:24 +00:00
Jochum van der Ploeg
477221998a feat(flame): Add helper methods to create frame data on SpriteSheet (#2754)
Add two methods to SpriteSheet to create frame data for SpriteAnimation
2023-09-21 11:34:02 +02:00
Giles Correia Morton
970babe97e docs: Minor updates to steps 3 & 4 in Klondike tutorial (#2626)
I have just finished steps 1-4 of the Klondike tutorial and noticed a
couple of minor things that look to be outdated with the current dart /
flame versions.

### Step 3 - `late` keyword isn't required
When following this step the analyser hightlight this rule
[unnecessary_late](https://dart.dev/tools/linter-rules/unnecessary_late)
(introduced in Dart 2.16.0) which states:

> Top-level and static variables with initializers are already evaluated
lazily as if they are marked late.

I updated the notes around why the laziness is important so the reader
can still understand the reasoning.
2023-07-29 13:15:11 +00:00
Joseph Carrington
b111007b8b docs: Update step3.md of Klondike tutorial to give Card isFaceDown (#2581)
Update step3.md of Klondike tutorial to give Card isFaceDown Since that property is used in step 4.
2023-06-25 15:51:33 +00:00
Joseph Carrington
034edfb22b fix: Update step3.md to use correct constructor name (#2577)
In the tutorial, the code that relies on Rank uses the .fromInt constructor, not .of
2023-06-16 20:37:40 +02:00
Lukas Klingsbo
de04514e29 ci: Markdown linting (#1920)
Adds markdown linting to the CI and fixes up all the current files.
2022-09-19 21:17:50 +00:00
Pasha Stetsenko
cf393761a1 docs: Chapter 3 of the Klondike game tutorial (#1515) 2022-04-11 21:27:54 +00:00