Kent Beck shows in Test Driven Development by Example a good way to make progress. One important point is that all unclear points and todos, which cannot be immediately and quickly solved, go onto a todo-list. In general it might be easier to have it on paper, but I feel using a separate Issue in GitHub is the best place for it.
I keep track of the issues while I'm working on a user story (GitHub Issue). All todos that are not solved after closing the user story, but do not influence the acceptance criteria, will be linked/copied here. That way there is always one central place and I feel a little saver that I don't forget something.
[ ] Snake::executeMove moves body independently of head. Probably this will get us in some trouble.
[ ] is it a problem that the Game::isStarted signal is emitted before Snake::setMoveDirection is executed?
[ ] Do I need to test that the Game starts in NoMove "state"? If yes, how do I test that?
[ ] According to MVVM it might be better to place the Timer inside the GameViewModel instead of the MainWindow. Check whether there is a possibility to do this while keeping up a good testability.
[ ] QSignalSpy has some wired behavior. While I can use QSignalSpy another_signal(&game_dependency, &Game::isStarted) on the Game class, only QSignalSpy is_started_signal(&sut, SIGNAL(gameStarted())); works for the GameViewModel. No idea why that is.
[x] GameViewModel might require a signal userMessageUpdated. This would improve single responsibility and maybe allow separate interfaces for View (one MainWindow is using and one GameBoardView is using).
added/copied from #4
[ ] check whether it is required to test that snake does not change movement direction if an unsupported key is pressed. This might involve adding a complex test or a mocking library. See this comment for details/context.
[ ] Game::isGameStarted method should be renamed to Game::isStarted once the signal Game::isStarted is changed to Game::stateChanged or similar. This should happen once #13 is implemented.
Kent Beck shows in Test Driven Development by Example a good way to make progress. One important point is that all unclear points and todos, which cannot be immediately and quickly solved, go onto a todo-list. In general it might be easier to have it on paper, but I feel using a separate Issue in GitHub is the best place for it.
I keep track of the issues while I'm working on a user story (GitHub Issue). All todos that are not solved after closing the user story, but do not influence the acceptance criteria, will be linked/copied here. That way there is always one central place and I feel a little saver that I don't forget something.
Snake::executeMove
moves body independently of head. Probably this will get us in some trouble.Game::isStarted
signal is emitted beforeSnake::setMoveDirection
is executed?GameViewModel
instead of theMainWindow
. Check whether there is a possibility to do this while keeping up a good testability.QSignalSpy
has some wired behavior. While I can useQSignalSpy another_signal(&game_dependency, &Game::isStarted)
on theGame
class, onlyQSignalSpy is_started_signal(&sut, SIGNAL(gameStarted()));
works for theGameViewModel
. No idea why that is.GameViewModel
might require a signaluserMessageUpdated
. This would improve single responsibility and maybe allow separate interfaces for View (oneMainWindow
is using and oneGameBoardView
is using).Game::isGameStarted
method should be renamed toGame::isStarted
once the signalGame::isStarted
is changed toGame::stateChanged
or similar. This should happen once #13 is implemented.