3. 코딩하기
저번에는 각각의 클래스의 역할을 정하고 클래스 다이어그램 역 설계를 했다. 이번에는 완성을 할 시간이다! 다음은 각 클래스에서 주요한 부분에 대한 설명이다. - Grid 클래스 Grid::Grid() { numRows = 20; numCols = 10; cellSize = 30; Initialize(); colors = GetCellColors(); } //각 셀에 셀에 대한 정보를 받아와 출력한다. void Grid::Draw() { for (int row = 0; row < numRows; row++) { for (int column = 0; column < numCols; column++) { int cellValue = grid[row][column]; DrawRectangle(column * c..