Skip to content

Conversation

sarvasvaKhare
Copy link
Contributor

added cards shuffling function ,the server would be sending a 2-d array to all clients where playercards[i] would contain card ids which will be random number from 0 to 53 for ith player .

for (var a=[],i=0;i<54;++i) a[i]=i;

function shuffle(array) {
var tmp, current, top = array.length;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use var

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to use it const give an linting error in ++i and let gives an error in a =shuffle(a).Any other suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants