 
   assertEmptyBoard: (test) =>
     @assertStonePointCounts test, 19*19, 0, 0
+
+  assertPrisoners: (test, counts) ->
+    for color, count of counts
+      actualCount = parseInt casper.evaluate(
+        (color) -> $(".prisoners.#{color}").val(),
+        color)
+      test.assertEqual actualCount, count,
+        "#{color} prisoners should be #{count}, is #{actualCount}"
 
 
 class ClientSideJsTest extends BrowserTest

      createLoginSession email
      casper.thenOpen serverUrl
      casper.thenClick (@lastGameSelector true), thenFn  # true = our turn

    # black opens the game and passes
    # (it should be black's turn since there are no actual moves in this game,

    BLACK_EMAIL = 'black@schwarz.de'
    WHITE_EMAIL = 'white@wit.nl'
    clearGamesForPlayer p for p in [BLACK_EMAIL, WHITE_EMAIL]
    createGame BLACK_EMAIL, WHITE_EMAIL, ['....b',
                                          'bb.wb',
                                          '...wb',
                                          'wwwwb',
