MCPcopy Index your code
hub / github.com/careercup/ctci / getScoreForColor

Method getScoreForColor

java/Chapter 8/Question8_8/Board.java:103–109  ·  view source on GitHub ↗
(Color c)

Source from the content-addressed store, hash-verified

101 }
102
103 public int getScoreForColor(Color c) {
104 if (c == Color.Black) {
105 return blackCount;
106 } else {
107 return whiteCount;
108 }
109 }
110
111 public void updateScore(Color newColor, int newPieces) {
112 /* If we added x pieces of a color, then we actually removed x - 1 pieces of the other

Callers 1

getScoreMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected