Kurssiesittely | Luennot | Harjoitukset |
---|
See the instructions in the first exercise.
max 6 points
nineplaces.Diagram
so that its variables and methods have better names. In this class, almost all non-public members have been renamed (the last two methods, index
and contains
, have not been changed). Use the Rename refactoring of your IDE and refactor the class until all of its names make sense. (The structure of the methods does not need to be changed. Just renaming will be enough.) Print the end result of your refactoring on paper so that it would be easier to discuss it in the exercise group.
You can get instructions for choosing good names from the Clean Code book's chapter 2 or the article Meaningful Names.
1 point: Half of the method and variable names have been named sensibly. All tests pass.
2 points: All of the method and variable names have been named sensibly. All tests pass.
RotatingPiecesOfBlocksTest
and RotatingTetrominoesTest
using TDD. The test cases have been provided, so you need to just remove their comments one at a time, as you manage to write production code to pass the tests.
1 point: All previous tests pass and out of RotatingPiecesOfBlocksTest
's 6 tests 3 pass.
2 points: All previous tests pass and out of RotatingPiecesOfBlocksTest
's 6 tests 6 pass.
3 points: All previous tests pass and out of RotatingTetrominoesTest
's 12 tests 5 pass.
4 points: All previous tests pass and out of RotatingTetrominoesTest
's 12 tests 12 pass.
In the exercise group we will discuss about naming variables, pair program starting from Tetris #4 and do the challenging refactoring in its beginning. If the refactoring goes too easily, refactor also your pair's version.