Golden Flower JS implementation from 0-------now nothing (1)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.