MCPcopy Create free account
hub / github.com/careercup/ctci / score

Method score

java/Chapter 8/Question8_1/Hand.java:8–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 protected ArrayList<T> cards = new ArrayList<T>();
7
8 public int score() {
9 int score = 0;
10 for (T card : cards) {
11 score += card.value();
12 }
13 return score;
14 }
15
16 public void addCard(T card) {
17 cards.add(card);

Callers 2

playHandMethod · 0.45
printHandsAndScoreMethod · 0.45

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected