|
|
|
|
| what are the examples of bad programming habits in this code |
using namespace std;system("pause");isTaken() is very inefficient because you count your way up to find the i and j coordinates that correspond to pos. It would be much shorter to compute it instead. Also note that you can return a bool value directly instead of doing if (condition) return true; else return false;: |
|
|
|
|
|
|
|