sudoku's People
sudoku's Issues
后期维护建议
个人认为功能逻辑与输入输出部分的代码分离更易于维护。solve_and_output()
和generate_and_output()
方法可以只传出得到的结果(如数组形式),而不输出到文件,让Sudoku外的方法负责输出,这样无论需要什么形式输入与输出都不用修改这两个方法的代码。
Sudoku::set方法修改建议
Sudoku::set
方法中
for (int i = 1; i <= LEN; ++i) {
for (int j = 1; j <= LEN; ++j) {
board[i][j] = b[i][j];
}
}
可以用memcpy()库函数进行复制
宏定义命名建议
Sudoku.cpp
中这两行宏定义命名可以稍加修饰,明确用途
#define START 2
#define LEN 9
调试代码清除建议
InputHandler::get_board
中的调试代码可以删除,git的版本控制能帮助找回之前代码。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.