- Test-Driven Java Development(Second Edition)
- Alex Garcia Viktor Farcic
- 249字
- 2021-06-24 18:31:52
Tic-Tac-Toe game requirements
Tic-Tac-Toe is most often played by young children. The rules of the game are fairly simple.
For more information about the game, please visit Wikipedia ( http://en.wikipedia.org/wiki/Tic-tac-toe).
More detailed requirements will be presented later on.
The exercise consists of the creation of a single test that corresponds to one of the requirements. The test is followed by the code that fulfills the expectations of that test. Finally, if needed, the code is refactored. The same procedure should be repeated with more tests related to the same requirement. Once we're satisfied with tests and the implementation of that requirement, we'll move to the next one until they're all done.
In real-world situations, you wouldn't get such detailed requirements, but dive right into tests that would act as both requirements and validation. However, until you get comfortable with TDD, we'll have to define requirements separately from tests.
Even though all the tests and the implementation are provided, try to read only one requirement at a time and write tests and implementation code yourself. Once done, compare your solution with the one from this book and move to the next requirement. There is no one and only one solution; yours might be better than the ones presented here.
- Oracle從入門到精通(第3版)
- JavaScript前端開發(fā)模塊化教程
- ReSharper Essentials
- Cassandra Design Patterns(Second Edition)
- C/C++常用算法手冊(第3版)
- 從0到1:Python數(shù)據(jù)分析
- Visual C++開發(fā)入行真功夫
- HTML 5與CSS 3權(quán)威指南(第3版·上冊)
- Python全棧數(shù)據(jù)工程師養(yǎng)成攻略(視頻講解版)
- Web前端應用開發(fā)技術(shù)
- Android Game Programming by Example
- ABAQUS6.14中文版有限元分析與實例詳解
- MongoDB Cookbook(Second Edition)
- STM8實戰(zhàn)
- Unity 5 Game Optimization