New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodegame-client

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodegame-client - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

.settings/.jsdtscope

2

package.json
{
"name": "nodegame-client"
, "description": "nodeGame client for the browser and node.js"
, "version": "0.1.3"
, "version": "0.1.4"
, "main" : "nodeGame.js"

@@ -6,0 +6,0 @@ , "homepage": "http://www.nodegame.org"

(function (exports, node) {
/*
* Holds information about the list of players.
*
*/
var JSUS = node.Utils;

@@ -18,3 +13,19 @@ var NDDB = node.NDDB;

/**
* Transforms an array of array (of players) into an
* array of PlayerList instances and returns it.
*
* The original array is modified.
*
*/
PlayerList.array2Groups = function (array) {
if (!array) return;
for (var i = 0; i < array.length; i++) {
array[i] = new PlayerList({}, array[i]);
};
return array;
};
/**
* PlayerList interface

@@ -108,3 +119,3 @@ *

if (this.exist(id)) {
this.pl[id] = player;
this.db[id] = player;

@@ -130,3 +141,3 @@ return true;

//node.log(this.pl);
//node.log(this.db);

@@ -233,2 +244,14 @@ this.select('id', '=', id).first().state = state;

PlayerList.prototype.getNGroups = function (N) {
if (!N) return;
var groups = JSUS.getNGroups(this.db, N);
return PlayerList.array2Groups(groups);
};
PlayerList.prototype.getGroupsSizeN = function (N) {
if (!N) return;
var groups = JSUS.getGroupsSizeN(this.db, N);
return PlayerList.array2Groups(groups);
};
//Player

@@ -292,5 +315,5 @@

//
// for (var key in this.pl) {
// if (this.pl.hasOwnProperty(key)) {
// result.push(this.pl[key]);
// for (var key in this.db) {
// if (this.db.hasOwnProperty(key)) {
// result.push(this.db[key]);
// }

@@ -297,0 +320,0 @@ // }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc