diff options
Diffstat (limited to 'bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving')
55 files changed, 297 insertions, 0 deletions
diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/audio/correct.ogg b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/audio/correct.ogg Binary files differnew file mode 100755 index 0000000..a0d9e3a --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/audio/correct.ogg diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/1.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/1.png Binary files differnew file mode 100755 index 0000000..228dee5 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/1.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/10.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/10.png Binary files differnew file mode 100755 index 0000000..fe2fcd5 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/10.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/11.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/11.png Binary files differnew file mode 100755 index 0000000..1ee13fa --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/11.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/12.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/12.png Binary files differnew file mode 100755 index 0000000..26bfe83 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/12.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/13.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/13.png Binary files differnew file mode 100755 index 0000000..520e86b --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/13.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/14.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/14.png Binary files differnew file mode 100755 index 0000000..b9fe502 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/14.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/15.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/15.png Binary files differnew file mode 100755 index 0000000..3240769 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/15.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/16.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/16.png Binary files differnew file mode 100755 index 0000000..60d1ba0 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/16.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/2.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/2.png Binary files differnew file mode 100755 index 0000000..ce9ac3c --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/2.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/3.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/3.png Binary files differnew file mode 100755 index 0000000..9531865 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/3.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/4.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/4.png Binary files differnew file mode 100755 index 0000000..f436bcd --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/4.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/5.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/5.png Binary files differnew file mode 100755 index 0000000..af7f7c4 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/5.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/6.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/6.png Binary files differnew file mode 100755 index 0000000..ed048ae --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/6.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/7.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/7.png Binary files differnew file mode 100755 index 0000000..b71da02 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/7.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/8.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/8.png Binary files differnew file mode 100755 index 0000000..5b32426 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/8.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/9.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/9.png Binary files differnew file mode 100755 index 0000000..ca2c60d --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/9.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/img1.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/img1.png Binary files differnew file mode 100755 index 0000000..4d0c15b --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img1/img1.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/1.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/1.png Binary files differnew file mode 100755 index 0000000..b85d3cf --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/1.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/10.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/10.png Binary files differnew file mode 100755 index 0000000..5b05c21 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/10.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/11.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/11.png Binary files differnew file mode 100755 index 0000000..2ad0a9d --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/11.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/12.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/12.png Binary files differnew file mode 100755 index 0000000..405154e --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/12.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/13.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/13.png Binary files differnew file mode 100755 index 0000000..21d5408 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/13.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/14.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/14.png Binary files differnew file mode 100755 index 0000000..632d9c8 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/14.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/15.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/15.png Binary files differnew file mode 100755 index 0000000..2acc8e3 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/15.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/16.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/16.png Binary files differnew file mode 100755 index 0000000..55603f1 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/16.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/2.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/2.png Binary files differnew file mode 100755 index 0000000..f9cecf8 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/2.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/3.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/3.png Binary files differnew file mode 100755 index 0000000..f72c8c9 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/3.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/4.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/4.png Binary files differnew file mode 100755 index 0000000..3baa0f1 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/4.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/5.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/5.png Binary files differnew file mode 100755 index 0000000..21e35dd --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/5.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/6.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/6.png Binary files differnew file mode 100755 index 0000000..96cbb6e --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/6.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/7.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/7.png Binary files differnew file mode 100755 index 0000000..b009529 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/7.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/8.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/8.png Binary files differnew file mode 100755 index 0000000..6e6d65e --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/8.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/9.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/9.png Binary files differnew file mode 100755 index 0000000..98b54eb --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/9.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/img2.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/img2.png Binary files differnew file mode 100755 index 0000000..cf91a83 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img2/img2.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/1.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/1.png Binary files differnew file mode 100755 index 0000000..d8aa161 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/1.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/10.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/10.png Binary files differnew file mode 100755 index 0000000..e5aa0b6 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/10.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/11.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/11.png Binary files differnew file mode 100755 index 0000000..a0006f3 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/11.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/12.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/12.png Binary files differnew file mode 100755 index 0000000..1ae0a06 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/12.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/13.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/13.png Binary files differnew file mode 100755 index 0000000..5018862 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/13.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/14.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/14.png Binary files differnew file mode 100755 index 0000000..f96e47a --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/14.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/15.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/15.png Binary files differnew file mode 100755 index 0000000..57fc10c --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/15.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/16.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/16.png Binary files differnew file mode 100755 index 0000000..67d4454 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/16.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/2.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/2.png Binary files differnew file mode 100755 index 0000000..782c956 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/2.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/3.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/3.png Binary files differnew file mode 100755 index 0000000..c9d9cd3 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/3.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/4.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/4.png Binary files differnew file mode 100755 index 0000000..741c750 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/4.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/5.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/5.png Binary files differnew file mode 100755 index 0000000..9babc2f --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/5.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/6.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/6.png Binary files differnew file mode 100755 index 0000000..de13592 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/6.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/7.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/7.png Binary files differnew file mode 100755 index 0000000..7689919 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/7.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/8.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/8.png Binary files differnew file mode 100755 index 0000000..fa5daba --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/8.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/9.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/9.png Binary files differnew file mode 100755 index 0000000..88cd312 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/9.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/img3.png b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/img3.png Binary files differnew file mode 100755 index 0000000..21099d1 --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/assets/image/img3/img3.png diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/css/lesson.css b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/css/lesson.css new file mode 100755 index 0000000..a77a19b --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/css/lesson.css @@ -0,0 +1,51 @@ +body { + background: #affafc; + } + +#gamearea{ + float:right; + width: 664px; + border: 5px gold dashed; + padding: 10px; +} + +#feedback_image #img1,#img2,#img3 { + display: none; +} + +.dragme { + width: 160px; + height: 120px; + padding: 1px 3px 0px 3px; /*top right bottom left*/ + cursor: move; + +} + +#imageBar{ + margin-left: 20px; + margin-top:15px; + float:left; + width: 225px; + height: 495px; + border: 2px solid red; + +} + +.imageThumb{ + margin: 5px; + width: 200px; + height: 138px; + border: 2px groove #00FF00; + padding: 5px; + margin 1em; +} + +.imgMain{ + width: 640px; + height: 480px; + float : right; + padding : 10px; + visibility: hidden; + position:relative; +} +
\ No newline at end of file diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/index.html b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/index.html new file mode 100755 index 0000000..f0cc0fa --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/index.html @@ -0,0 +1,28 @@ +<!DOCTYPE HTML> +<html> + <head> + <title> English_Alphabet Puzzle Solving Game </title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en-us" /> + <meta name="keywords" content="karma,javascript,html5,sugar,sugarlabs,gsoc,ole,nepal,image puzzle" /> + <link type="image/ico" rel="icon" href="../../assets/default/image/favicon.ico" /> + <link rel="stylesheet" type="text/css" href="css/lesson.css" /> + <script type="text/javascript" src="../../js/jquery-1.3.2.min.js"></script> + <script type="text/javascript" src="../../js/karma.js"></script> + <script type="text/javascript" src="js/lesson.js"></script> + </head> + <body> + <div id = "imageBar"> + <a href="#" id="anchorImg1"><img class="imageThumb" src="assets/image/img1/img1.png" alt="" /></a> + <a href="#" id="anchorImg2"><img class="imageThumb" src="assets/image/img2/img2.png" alt="" /></a> + <a href="#" id="anchorImg3"><img class="imageThumb" src="assets/image/img3/img3.png" alt="" /></a> + </div> + <div id="gamearea"> + <div id="feedback_image"> + <img id="img1" src="assets/image/img1/img1.png" alt=""/> + <img id="img2" src="assets/image/img2/img2.png" alt=""/> + <img id="img3" src="assets/image/img3/img3.png" alt=""/> + </div> + </div> + </body> +</html>
\ No newline at end of file diff --git a/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/js/lesson.js b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/js/lesson.js new file mode 100755 index 0000000..2e2018a --- /dev/null +++ b/bundles/XO/karma/lessons/English_Alphabet_Puzzle_Solving/js/lesson.js @@ -0,0 +1,218 @@ +$(document).ready(function() { + var k = Karma({ + audio: [{'name':'correct','file':'correct.ogg'}]}); + + k.ready(function(){ + + //initialize the variables used and display initial value + var drag_no = 0; //store the current dragged no + var drop_no = 0; //store the current dropped on no + var imgrand = []; //stores the random variables generated + var imgPosition = []; //stores the position of the random variable + var drag_position = 0; //position of dragged object + var drop_position = 0; //position of dropped object + var flag, i ,j; + var moves_count = 0; + var imgPath; + + + var feedbackImage = $('#feedback_image'); + for(var i=0; i<16; i++){ + feedbackImage.append("<img class='dragme' id='imgdrag" + + i + "' draggable='true' src='' alt='' />"); + } + + + game("img1"); + + $('a#anchorImg1').click(function(){ + $("#"+imgPath+"").hide(); + $(".dragme").show(); + game("img1"); + + + }); + + $('a#anchorImg2').click(function(){ + $("#"+imgPath+"").hide(); + $(".dragme").show(); + game("img2"); + + }); + + $('a#anchorImg3').click(function(){ + $("#"+imgPath+"").hide(); + $(".dragme").show(); + game("img3"); + + }); + + function generate_random_no() { //generate random number + var rand_no = Math.ceil(16*Math.random()); + return rand_no; + } + + //update the Random variable number according to the position + //update number according to the position and the value + function update_Numbers_position(){ + imgrand[drag_position] = drop_no; + imgrand[drop_position] = drag_no; + } + + //Check the game over + function check_game_over(){ + var x = 0; + for(i=0;i<16;i++){ + if(imgrand[i] == i+1){ + x++; + } + } + if(x == 16){ //puzzle solved . Hurray + k.audio.correct.play(); + $(".dragme").hide(); + $("#"+imgPath+"").fadeIn(5000); + + + } + } + + function game(imgPuzzle){ //draws the necessary random numbers for the game + imgPath = imgPuzzle; + imgrand[0]=generate_random_no(); //1 number generated, 3 different numbers to be generated + for(i=1; i<16; i++){ + do{ + flag = 0; + imgrand[i] = generate_random_no(); + for(j=0; j<i; j++){ + if(imgrand[i]===imgrand[j]){ + flag++; + } + } + }while(flag != 0 ); //end of do while loop + } + + for(i=0; i<16; i++){ + imgPosition[i] = i; + document.getElementById("imgdrag"+i+"").src = "assets/image/"+imgPath+"/"+imgrand[i]+".png"; + } + + } //end of game() + $('#feedback_image').bind('dragstart', function(ev) { + if (!$(ev.target).hasClass('dragme')) + return true; + switch (ev.target.id) { + case 'imgdrag0': + drag_no = imgrand[0]; drag_position = 0; break; + case 'imgdrag1': + drag_no = imgrand[1]; drag_position = 1; break; + case 'imgdrag2': + drag_no = imgrand[2]; drag_position = 2; break; + case 'imgdrag3': + drag_no = imgrand[3]; drag_position = 3; break; + case 'imgdrag4': + drag_no = imgrand[4]; drag_position = 4; break; + case 'imgdrag5': + drag_no = imgrand[5]; drag_position = 5; break; + case 'imgdrag6': + drag_no = imgrand[6]; drag_position = 6; break; + case 'imgdrag7': + drag_no = imgrand[7]; drag_position = 7; break; + case 'imgdrag8': + drag_no = imgrand[8]; drag_position = 8; break; + case 'imgdrag9': + drag_no = imgrand[9]; drag_position = 9; break; + case 'imgdrag10': + drag_no = imgrand[10]; drag_position = 10; break; + case 'imgdrag11': + drag_no = imgrand[11]; drag_position = 11; break; + case 'imgdrag12': + drag_no = imgrand[12]; drag_position = 12; break; + case 'imgdrag13': + drag_no = imgrand[13]; drag_position = 13; break; + case 'imgdrag14': + drag_no = imgrand[14]; drag_position = 14; break; + case 'imgdrag15': + drag_no = imgrand[15]; drag_position = 15; break; + } + + //document.display.dragBox.value = drag_no; + //document.display.dragPos.value = drag_position; + + return true; + }); + + // Set up the drop zone. + $('#feedback_image').bind('dragenter', function(ev) { // Update the drop zone class on drag enter/leave + if (!$(ev.target).hasClass('dragme')) return true; + $(ev.target).addClass('dragover'); return false; + }) + + .bind('dragleave', function(ev) { + if (!$(ev.target).hasClass('dragme')) return true; + $(ev.target).removeClass('dragover'); return false; + }) + + // Allow drops of any kind into the zone. + .bind('dragover', function(ev) { + if (!$(ev.target).hasClass('dragme')) return true; + return false; + }) + + // Handle the final drop... + .bind('drop', function(ev) { + if (!$(ev.target).hasClass('dragme')) return true; + switch (ev.target.id) { + case 'imgdrag0': + drop_no = imgrand[0]; drop_position = 0; break; + case 'imgdrag1': + drop_no = imgrand[1]; drop_position = 1; break; + case 'imgdrag2': + drop_no = imgrand[2]; drop_position = 2; break; + case 'imgdrag3': + drop_no = imgrand[3]; drop_position = 3; break; + case 'imgdrag4': + drop_no = imgrand[4]; drop_position = 4; break; + case 'imgdrag5': + drop_no = imgrand[5]; drop_position = 5; break; + case 'imgdrag6': + drop_no = imgrand[6]; drop_position = 6; break; + case 'imgdrag7': + drop_no = imgrand[7]; drop_position = 7; break; + case 'imgdrag8': + drop_no = imgrand[8]; drop_position = 8; break; + case 'imgdrag9': + drop_no = imgrand[9]; drop_position = 9; break; + case 'imgdrag10': + drop_no = imgrand[10]; drop_position = 10; break; + case 'imgdrag11': + drop_no = imgrand[11]; drop_position = 11; break; + case 'imgdrag12': + drop_no = imgrand[12]; drop_position = 12; break; + case 'imgdrag13': + drop_no = imgrand[13]; drop_position = 13; break; + case 'imgdrag14': + drop_no = imgrand[14]; drop_position = 14; break; + case 'imgdrag15': + drop_no = imgrand[15]; drop_position = 15; break; + } + + moves_count++; + //document.display.dropBox.value = drop_no; + //document.display.dropPos.value = drop_position; + //document.display.moves.value = moves_count; + + document.getElementById("imgdrag"+imgPosition[drag_position]+"").src = "assets/image/"+imgPath+"/"+drop_no+".png"; + document.getElementById("imgdrag"+imgPosition[drop_position]+"").src = "assets/image/"+imgPath+"/"+drag_no+".png"; + + update_Numbers_position(); + + + //Game over condition + check_game_over(); + + ev.stopPropagation(); + return false; + }); + + }); +}); //end of document.ready |