TDD Tetris Tutorial
Shows how to go through the TDD Tetris Tutorial, where you can learn Test-Driven Development by at first writing code to pass pre-written tests, so that it will be easier to write your own tests when the time for it comes.
- Project repo: https://github.com/luontola/tdd-tetris-tutorial
- Screencast branch: https://github.com/luontola/tdd-tetris-tutorial/tree/take3
- Episodes7
- Total length5 h 9 min
- Latest episode2015-03-30
Episodes
| Pre-Written Tests | ||
|---|---|---|
| TDD Tetris Tutorial #1: Falling Blocks | YouTube MP4 | |
A core feature of Tetris is that there are pieces falling down. To start small, let's focus on pieces which consist of a single 1x1 block. |
||
| TDD Tetris Tutorial #2: Rotating Pieces of Blocks | YouTube MP4 | |
Another core feature of Tetris is that it's possible to rotate the pieces. Let's write a generic algorithm for rotating arbitrary shapes. That should bring us closer toward a game of Tetris. |
||
| TDD Tetris Tutorial #3: Rotating Tetrominoes | YouTube MP4 | |
With a generic piece rotation algorithm at hand, it'll be easier to implement rotating Tetris pieces. |
||
| TDD Tetris Tutorial #4: Falling Pieces | YouTube MP4 | |
We have implemented falling blocks and rotatable pieces in isolation. Now let's put them together by implementing arbitrarily shaped falling pieces. |
||
| Pre-Written Test Names | ||
| TDD Tetris Tutorial #5: Moving a Falling Piece | YouTube MP4 | |
Time to put the player in control. We implement moving the falling pieces, within the bounds of available space on the game board. |
||
| TDD Tetris Tutorial #6: Rotating a Falling Piece | YouTube MP4 | |
More player controls. We implement rotating the falling pieces, including also support for wallkicks. |
||
| Training Wheels Off | ||
| TDD Tetris Tutorial #7: TGM Rotation Rules | YouTube MP4 | |
Replacing our previously written rotation algorithm with a simpler and more flexible implementation, so that we can change our game to use the rotation rules from Tetris: The Grand Master. |
||