Permalink
Browse files

remove obsolete myfunctions.js file

  • Loading branch information...
1 parent 34aa2c8 commit e5692aa6aa50c24c74fab0bcf24fd5a21f8dc17c James Gater committed Mar 5, 2012
Showing with 0 additions and 30 deletions.
  1. +0 −30 myblackjack/myFunctions.js
View
@@ -1,30 +0,0 @@
-// shuffle an array function
- exports.shuffle = function(array) {
- var tmp, i, j;
- for ( i = array.length - 1 ; i ; i-- ) {
- j = Math.floor(Math.random() * (i + 1));
- tmp = array[j];
- array[j] = array[i];
- array[i] = tmp;
- }
- return array;
- };
-
-// Our deal function will return the last card(s) from the deck
- exports.deal = function(cardsToDeal,hand,deck) {
- if (!hand) {hand = [];}
- for (i=0;i<cardsToDeal;i++) {
- hand.push(deck.pop());
- }
- return hand;
- };
-
-// Score the hand
- exports.score = function(hand) {
- var totalScore=0;
- for (var mycard in hand) {
- totalScore += hand[mycard].value;
- }
- return totalScore;
- };
-

0 comments on commit e5692aa

Please sign in to comment.