<commit_before>/******************************************************************************
playScore.js
Author: <EMAIL>
Date: 4/6/2015
Version: 0.0.5
*******************************************************************************/
var mongoose = require('mongoose');
var cards = require('card');
var user = require('user');

// Schema for player score -- How do we relate this to the user though? ask Raga

var playerScoreSchema = mongoose.Schema({
	playerScore: {
		gameScore = [cards],
		overallScore: Number,
		cardId: cards.Types.ObjectId,
		userId: user.Types.ObjectId
	}
});

// Makes the model for the schema useful
module.exports = mongoose.model('PlayerScore', playerScoreSchema);
// Updating User's gameScore and overallScore based off user's email which is unique.
db.score.update(
{ email: "<EMAIL>" },
{ $inc: { score: 1, overallScore: 1 } }
)
<commit_msg>Update playerScore.js<commit_after>/******************************************************************************
playScore.js
Author: <EMAIL>
Date: 4/6/2015
Version: 0.0.5
*******************************************************************************/
var mongoose = require('mongoose');
var cards = require('card');
var user = require('user');

// Schema for player score -- How do we relate this to the user though? ask Raga

var playerScoreSchema = mongoose.Schema({
	playerScore: {
		gameScore = [cards],		// Array of Cards user has won in current game
		overallScore: Number,		// Overall Score user has gained
		userId: user.Types.ObjectId	// UserId, email address can also be used as reference
	}
});

// Makes the model for the schema useful
module.exports = mongoose.model('PlayerScore', playerScoreSchema);
// Updating User's gameScore and overallScore based off user's email which is unique.
db.score.update(
{ email: "<EMAIL>" },
{ $inc: { score: 1, overallScore: 1 } }
)

{'fraction_non_alphanumeric': 0.27649273803119956, 'fraction_numerical': 0.011834319526627219, 'mean_word_length': 5.262626262626263, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2869683', 'n_tokens_mistral': 530, 'n_tokens_neox': 499, 'n_words': 170}