function GetCard()
{
var cards=[
sixC,
sixD,
sixH,
sixS,
sevenC,
sevenD,
sevenH,
sevenS,
eightC,
eightD,
eightH,
eightS,
nineC,
nineD,
nineH,
nineS,
tenC,
tenD,
tenH,
tenS,
JacketC,
JacketD,
JacketH,
JacketS,];
var i= Rnd(0,cards.length-1)
return (cards[i]);
}
function GetPic(){
return GetCard().pic;
}
function GetPoint(){
return GetCard().point;
}
console.log(GetPoint());
// Show the cards in the display
{
var pc = document.getElementById("cardDealer1");
pc.innerHTML="<img style='width:115px; position:absolute;margin-top:10px;margin-left:10px; height=300px' src=" + GetPic()+ ">";
function GetPic(card){ return card.pic; }
function GetPoint(card){ return card.point; }
var card = GetCard();
var point = GetPoint(card);
var pic = GetPic(card);
var card = GetCard();
var point = card.point;
var pic = card.pic;
function GetCard()
{
var cards=[
sixC,
sixD,
sixH,
sixS,
sevenC,
sevenD,
sevenH,
sevenS,
eightC,
eightD,
eightH,
eightS,
nineC,
nineD,
nineH,
nineS,
tenC,
tenD,
tenH,
tenS,
JacketC,
JacketD,
JacketH,
JacketS,];
var i= Rnd(0,cards.length-1)
var card = cards[i];
return {
getPic: function(){return card.pic;},
getPoint: function(){return card.point;},
};
}
var card = GetCard();
var point = card.getPoint();
var pic = card.getPic();