       prisoners.white += result.captures.white
   if scoring
     [x, y] = [null, null]
-    {boardState, prisoners} = scoreState {boardState, prisoners}
-  {boardState: boardState, lastPlayed: {x, y}, prisoners: prisoners}
+    {boardState, prisoners, scores} = scoreState {boardState, prisoners}
+  else
+    scores = null
+  {boardState, lastPlayed: {x, y}, prisoners, scores}
 
 scoreState = (stateObj) ->
   "given a board state, change its 'empty' points to 'blackscore',
-  'whitescore' and 'dame' and return it"
+  'whitescore' and 'dame' and return it with prisoner counts and total
+  scores"
   {boardState, prisoners} = stateObj
 
   setRegionScores = (region, color) ->

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


      when 'neither' then 'dame'
      else throw new Error "invalid boundary color: '#{boundary}'"

  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 = []
