Chinese chess games based on HTML5 and Chinese chess through html5

Source: Internet
Author: User

Chinese chess games based on HTML5 and Chinese chess through html5

Chess games are very mature in desktop games, and there are many Chinese chess versions. Today, this HTML5-based Chinese chess game is very distinctive. We can not only choose the difficulty of Chinese chess games, but also switch the board style. I am tired of writing the program. I would like to have a cup of coffee and a few clicks on the computer. I believe you know the algorithm of HTML5 Chinese chess games, you can open the source code to study this HTML5 Chinese chess game.

Download Online Preview source code

Implementation code.

Html code:

<Div class = "box" id = "box"> <div class = "chess_left"> <canvas id = "chess"> sorry, your browser does not support HTML5, upgrade your browser to IE9, firefox, or Google Chrome! </Canvas> <audio src = "audio/click.wav" id = "clickAudio" preload = "auto"> </audio> <! -- <Audio src = "audio/check.wav" id = "checkAudio" preload = "auto"> </audio> --> <audio src = "audio/select.wav" id = "selectAudio "preload =" auto "> </audio> <div class =" bn_box "id =" bnBox "> <input type =" button "name =" offensivePlay "id = "tyroPlay" value = ""/> <input type = "button" name = "offensivePlay" id = "superPlay" value = "Intermediate Level"/> <input type = "button" name = "button" id = "" value = "" disabled/> <! -- <Input type = "button" name = "offensivePlay" id = "offensivePlay" value = ""/> <input type = "button" name = "defensivePlay" id = "defensivePlay" value = "" "/> --> <input type =" button "name =" regret "id =" regretBn "value =" "/> <input type = "button" name = "billBn" id = "billBn" value = "" class = "bn_box"/> <input type = "button" name = "stypeBn" id = "stypeBn" value = "skin change"/> </div> <div class = "chess_right" id = "chessRight"> <select name =" billList "id =" billList "> </select> <ol id =" billBox "class =" bill_box "> </ol> </div> <div id =" moveInfo" class = "move_info"> </div>

Referenced js:

<script src="js/common.js"></script><script src="js/play.js"></script><script src="js/AI.js"></script><script src="js/bill.js"></script><script src="js/gambit.js"></script>

Via: http://www.w2bc.com/Article/20596

Related Article

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.