       when 'neither' then 'dame'
       else throw new Error "invalid boundary color: '#{boundary}'"
 
-  {boardState: boardState, prisoners: prisoners}
+  scores = do ->
+    black = prisoners.white
+    white = prisoners.black
+    for row in boardState
+      for point in row
+        if point == 'blackscore' then black += 1
+        if point == 'whitescore' then white += 1
+    {black, white}
+
+  {boardState, prisoners, scores}
 
 getEmptyRegions = (state) ->
   regions = []

                              changeCallback: @onNavigate,
                              sgfObject: origSgfObject,
                              viewingMove: @state.viewingMove),
         (React.createElement ScoreDom, prisoners: prisoners)]

BoardDom = React.createClass
  render: ->

    objState = stateFromSgfObject sgfObject,
                                  moves: moveToShow,
                                  scoring: scoringMode
    {boardState, lastPlayed, prisoners, scores} = objState
    size = parseInt(sgfObject.gameTrees[0].nodes[0].SZ, 10) or 19
    nextColor = null

