The new year is over. In retrospect, the only fun thing to do is to play with friends at home.
This article has been accordingly.
I'm sorry, but I have no idea at this time.
Let me take a stroke.
。。。
。。。
A smooth stroke ...
。。。
All right. Let's do it today:
(1) The size of all the cards will be sorted out first.
(2) Arrange all the cards in the suit.
(3) to produce a random size and random color of the thing, to generate three cards per person.
//All of the cards size var num = [2, 3, 4, 5, 6, 7, 8, 9, ten, ' J ', ' Q ', ' K ', ' A '];
// Black Spades, red hearts, plum Diamonds square Clubs suit var col = [' Spades ', ' hearts ', ' Diamonds ', ' clubs '];
// save it. var current1 = [],current2=[]; for (var i = 0; i<3; i++) { var current_i = [Num[parseint (Math.random () * num.length)], C Ol[parseint (Math.random () * col.length)]; var current_j = [Num[parseint (Math.random () * num.length)], Col[parseint (Math.random () * col.length)] ; Current1.unshift (current_i); Current2.unshift (Current_j);}
I have to get off work. Let's do it today.
By the right, we'll look at the effect in the console first:
Current1 and Current2 two sets of cards have been created.
Tomorrow we will compare the size.
Bye.
-------------not to be continued!
Golden Flower JS implementation from 0-------now nothing (1)