Html5+js "Five sub-flying" game implementation (vii) game demo

Source: Internet
Author: User

Before the first to the sixth chapter we have the "five sub-fly" the basic work of the game has been talked about, this chapter is mainly to share all the code to everyone, and then the small partners can also play a play.

As for the man-machine battle we put it in the back for analysis.

Demo Address: http://www.lyout.com/projects/fiveflychess/FiveflyChess7.htm

Now let's summarize some of the basic definitions of this little game:

//Defining Game Objectsfunctiongamechess () {//Initial Configuration     This. init =function()//...    //Draw Chess Pieces     This. Paint =function()//...     This. Repaint =function()//...    //start playing     This. Play =function()//...    //re-play, reset all the pieces     This. Replay =function()//...    //Get index number     This. GetIndex =function(PDest, PSRC)//...    //whether it can be moved     This. Canmove =function(PDest, PSRC)//...    //can you "pick a couple" ?     This. Cancarry =function(chess)//...    //is it possible to "clamp one"     This. Canclip =function(chess)//...    //Moving pieces     This. movechess =function(PDest, PSRC)//...    //Game Over     This. Isgameover =function(player)//...    //What player are you getting?     This. Getanotherplayer =function(player)//...    //game start (including loading)     This. Start =function(EL)//...}

Html5+js "Five sub-flying" game implementation (a) Rules

Html5+js "Five sub-flying" Game Realization (ii) route analysis and resource preparation

Html5+js "Five sub-flying" game implementation (iii) pages and chess pieces

Html5+js "Five sub-flying" game realization (four) clip one and pick a pair

Html5+js "Five sub-flying" game implementation (v) Moving pieces

Html5+js "Five sub-flying" game realization (vi) mouse response and multiple selection

Html5+js "Five sub-flying" game implementation (vii) game demo

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.