define([

  'Backbone',

  //Templates
  'text!templates/project-page/closeGameTemplate.html'
], function(

  Backbone,

  //Template
  closeGameTemplate
){
  var GameController = Backbone.View.extend({

    template: _.template(closeGameTemplate),

    initialize: function(){ },

    close: function(event){
      event.preventDefault();
      var task = this.selectedTask.get('id');
      socket.emit('close game', task);
    },

    render: function(){
      var estimations = this.selectedTask.get('estimated') || [];
      var time = this.selectedTask.get('time');

      if(!estimations[0]){
        estimations.push({
          player: 'No one estimated',
          card: '?'
        });
      }

      this.$el.html(this.template({estimations: estimations, time: time}));
    }

  });

  return GameController;
});

@@ -247,40 +247,8 @@
 ),%0A%0A
-    initialize: function()%7B %7D,%0A%0A
     
@@ -271,16 +271,16 @@
 event)%7B%0A
+
       ev
@@ -499,16 +499,23 @@
 ar time 
+       
 = this.s
@@ -538,16 +538,324 @@
 'time');
+%0A      var total       = _.countBy(estimations, function(estimation)%7B%0A        return estimation.card;%0A      %7D);%0A%0A      var max    = _.max(total, function(point)%7Breturn point;%7D);%0A%0A      var result = _.compact(_.map(total, function(count, point)%7B%0A        return count === max ? point : false; %0A      %7D)).pop();
 %0A%0A      
@@ -1016,16 +1016,25 @@
 mplate(%7B
+%0A        
 estimati
@@ -1051,16 +1051,25 @@
 ations, 
+%0A        
 time: ti
@@ -1074,13 +1074,46 @@
 time
+, %0A        result: result%0A      
 %7D));%0A
+%0A
     

Add result to game