{"size": 1475, "ext": "js", "max_stars_repo_path": "public/javascripts/services.js", "max_stars_repo_name": "kenttam/Big-2", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/javascripts/services.js", "max_issues_repo_name": "kenttam/Big-2", "max_issues_repo_issues_event_min_datetime": "2018-04-14T20:52:36.000Z", "max_issues_repo_issues_event_max_datetime": "2018-04-14T20:52:36.000Z", "max_forks_repo_path": "public/javascripts/services.js", "max_forks_repo_name": "kenttam/Big-2", "max_forks_repo_forks_event_min_datetime": "2022-02-22T02:38:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-22T02:38:07.000Z"}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 30.7291666667, "max_line_length": 70, "alphanum_fraction": 0.5071186441}
// Generated by CoffeeScript 1.6.3
(function() {
  window.deucesApp = angular.module('deuces', [], function($provide) {
    $provide.factory('socket', function($rootScope) {
      var socket;
      socket = io.connect();
      return {
        on: function(eventName, callback) {
          return socket.on(eventName, function() {
            var args;
            args = arguments;
            return $rootScope.$apply(function() {
              return callback.apply(socket, args);
            });
          });
        },
        emit: function(eventName, data, callback) {
          return socket.emit(eventName, data, function() {
            var args;
            args = arguments;
            return $rootScope.$apply(function() {
              if (callback) {
                return callback.apply(socket, args);
              }
            });
          });
        }
      };
    });
    return $provide.factory('playerMap', function($rootScope) {
      return function(playerIndex, players) {
        var currentPlayerIndex, directions, x, _i;
        directions = ["west", "north", "east"];
        for (x = _i = 0; _i < 3; x = ++_i) {
          currentPlayerIndex = playerIndex + x + 1;
          if (!(currentPlayerIndex > 3)) {
            players[currentPlayerIndex].seat = directions[x];
          } else {
            players[currentPlayerIndex - 4].seat = directions[x];
          }
        }
        return players;
      };
    });
  });

}).call(this);
