Returns the number of captured pegs.
(board)
| 173 | |
| 174 | |
| 175 | def getScore(board): |
| 176 | """Returns the number of captured pegs.""" |
| 177 | pegCount = 0 |
| 178 | for space in ALL_SPACES: |
| 179 | if board[space] == PEG: |
| 180 | pegCount += 1 |
| 181 | return 32 - pegCount |
| 182 | |
| 183 | |
| 184 | def checkIfPlayerHasWon(board): |
no outgoing calls
no test coverage detected