A. The board is being shuffled, so 1000 means ‘a lot, but not that much that you really have to start waiting for the board being shuffled’
B. getCandidates()
returns the candidates by filling them in the vector, v.clear()
resets the vector for new candidates.
C. Here 1,2,4,8 just means up,down,left,right (not in particular order). This is filled in by getCandidate()
. There seem to be no reason for these specific values, they could be used as bits in an byte, but that doesn’t seem to be the case here.
D. getCandidate()
fills up,down,left,right in a vector based on whether the empty spot is near which border.
1
solved Need help understanding some parts of “15 Puzzle Game” in C++ [closed]