//Sets tile safeties for discardsfunction updateDiscardedTilesSafety() { for(var k = 1; k < 4; k++) { //For all other players for(var i = 0; i < 4; i++) { //For all discard ponds for(var j = 0; j < discards[i].length; j++) { //For every tile in it if(typeof(discards[i][j].numberOfPlayerHandChanges) == "undefined") { discards[i][j].numberOfPlayerHandChanges = [0,0,0,0]; } if(hasPlayerHandChanged(k)) { if(j == discards[i].length - 1 && k < i && (k