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