- ScheduledWalk/석천
MoveRoach();
void MoveRoach() {
void MoveRoach();
MoveRoach();
MoveRoach 에 대한 Test Case 의 작성.
void MoveRoach() {
void testMoveRoach() {
currentRoachPosition = MoveRoach(currentRoachPosition, moveVector);
currentRoachPosition = MoveRoach(currentRoachPosition, moveVector);
Test Case 에 대해 만족하는 가장 간단한 MoveRoach 를 일단 구현해봅니다. 본래의 Requirement 의 경우 해당 판의 최대범위를 넘어가면
IntPair MoveRoach(IntPair currentRoachPosition, IntPair moveVector) {
void testMoveRoach() {
currentRoachPosition = MoveRoach(currentRoachPosition, moveVector, maxCol, maxRow);
전체 MoveNext 에 대해서 Test Case를 작성합니다. 그러면서 필요한 인자들을 생각해내고, 채워갑니다. MoveNext 에서 필요한 인자들은 GetMoveVector 와 MoveRoach, IncrementBoardBlockCount 에서 필요한 인자들의 총 집합이 됩니다.
testMoveRoach();
MoveNext 부분 test case 를 pass 하기 위해 실제 구현을 합니다. 이미 구현해둔 GetMoveVector, MoveRoach, IncrementBoardBlockCount 들을 조합하는 일만 하면 됩니다.
testMoveRoach();
updatedRoachPosition = MoveRoach(currentRoachPosition, moveVector, maxRow, maxCol);
IntPair MoveRoach(IntPair currentRoachPosition, IntPair moveVector, int maxRow, int maxCol);
void testMoveRoach();
Found 1 matching page out of 7540 total pages
You can also click here to search title.