$(document).ready(function() {
  game = new Game(81);
  $('#container').html(game.render())

  $('body').on('mousedown', '.cell', function(event) {
    switch (event.which) {
      case 1:
        game.click(this.id)
        break;
      case 3:
        game.flag(this.id)
        break;
    }
    if (game.checkForWin()){
      alert("YOU WIN!")
    }
    $('#container').html(game.render())
  });
});

@@ -341,17 +341,45 @@
 WIN!
-%22
+ Time: %22 + $('#clock').text()
 )%0A    %7D%0A
     
@@ -370,24 +370,25 @@
 xt())%0A    %7D%0A
+%0A
     $('#cont
@@ -421,12 +421,399 @@
 )%0A  %7D);%0A
-%7D);
+  var sec = 0;%0A  function pad ( val ) %7B return val %3E 9 ? val : %220%22 + val; %7D%0A  function reset () %7B%0A    sec = 0%0A%0A  %7D%0A  setInterval( function()%7B%0A      $(%22#seconds%22).html(pad(++sec%2560));%0A      $(%22#minutes%22).html(pad(parseInt(sec/60,10)));%0A  %7D, 1000);%0A%0A  $('#refresh').click(function(event)%7B%0A    console.log(game)%0A    game.newGame()%0A    $('#container').html(game.render())%0A    reset()%0A  %7D)%0A%0A%7D);%0A
 %0A

add clock and refresh