     white = prisoners.black
     for row in boardState
       for point in row
-        if point == 'blackscore' then black += 1
-        if point == 'whitescore' then white += 1
+        if point == 'blackscore' or point == 'whitedead' then black += 1
+        if point == 'whitescore' or point == 'blackdead' then white += 1
     {black, white}
 
   {boardState, prisoners, scores}

    nodes.push newMove

  return sgfObjectCopy

    [x, y] = [null, null]
    if deadStones?
      for [px, py] in deadStones
        switch boardState[py][px]
          when 'black'
            boardState[py][px] = 'blackdead'
            prisoners.black += 1
          when 'white'
            boardState[py][px] = 'whitedead'
            prisoners.white += 1
    {boardState, prisoners, scores} = scoreState {boardState, prisoners}
  else
    scores = null
