From 52bfde0e45ad3afcade398340effc1263105f325 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 30 Sep 2009 10:07:43 +0000 Subject: put all new names for refactoring adding_up in rename.txt --- diff --git a/examples/adding_up_to_10/js/lesson.js b/examples/adding_up_to_10/js/lesson.js index e2870c0..c2393c7 100755 --- a/examples/adding_up_to_10/js/lesson.js +++ b/examples/adding_up_to_10/js/lesson.js @@ -43,7 +43,7 @@ k.main(function() { var chooseMe; var createBox = function (paperName, width, height) { - var set, paper, box; + var set, paper; if(!width || !height){ paper = Raphael(paperName+"Paper", 200, 200); } diff --git a/examples/adding_up_to_10/js/rename.txt b/examples/adding_up_to_10/js/rename.txt index dc37e2c..500bec1 100644 --- a/examples/adding_up_to_10/js/rename.txt +++ b/examples/adding_up_to_10/js/rename.txt @@ -1,34 +1,34 @@ HTML --------------------- div id="karma-main" -div id="action" -div id="actionTop" -div id="topLtSide" -img id="topLtBox" -div id="topLtPaper" -div id="topMd" -img id="plussign" -div id="topRtSide" -img id="topRtBox" -div id="topRtPaper" -div id="bottom" -div id="bottomLt" -img class="bottomBox" -div id="bottomLtPaper" class="bottomBox" -div id="bottomMd" class="bottom" -img class="bottomBox" -div id="bottomMdPaper" class="bottomBox" -div id="bottomRt" class="bottom" -img class="bottomBox" -div id="bottomRtPaper" class="bottomBox" -div id="sidebar" -div class="sidebarItem" -img id="timer" -div id="timerPaper" -div class="sidebarItem" -img id="scorebox" -div id="scoreboxText" -div class="sidebarItem" +div id="action" --- main +div id="actionTop" --- top +div id="topLtSide" --- topLeftArea +img id="topLtBox" --- topLeftCard +div id="topLtPaper" --- topLeftPaper +div id="topMd" --- topMiddleArea +img id="plussign" --- plusImage +div id="topRtSide" --- topRightArea +img id="topRtBox" --- topRightCard +div id="topRtPaper" --- topRightPaper +div id="bottom" --- bottom +div id="bottomLt" --- bottomLeft +img class="bottomBox" --- bottomCards +div id="bottomLtPaper" class="bottomBox" --- bottomLeftPaper, bottomCard +div id="bottomMd" class="bottom" --- bottomMiddle, bottomAreas +img class="bottomBox" --- bottomCards +div id="bottomMdPaper" class="bottomBox" --- bottomMiddlePaper, bottomCards +div id="bottomRt" class="bottom" --- bottomRight, bottomAreas +img class="bottomBox" --- bottomCards +div id="bottomRtPaper" class="bottomBox" --- bottomRightPaper, bottomCards +div id="sidebar" --- side +div class="sidebarItem" --- sideItem +img id="timer" +div id="timerPaper" --- +div class="sidebarItem" --- sideItem +img id="scorebox" --- scoreBox +div id="scoreboxText" --- scoreBoxText +div class="sidebarItem" div id="chimpPaper" div id="buttons" button id="start" @@ -47,23 +47,46 @@ library.images var imgNames = ["ball", "banana", "balloon","chilli", "fish", "flower"]; //game logic - var total, n0, n1, correct; - var level = 0, d=160; --- D = 160; - var choices=[], score = 0, speed = 12000; + var total=0, n0, n1, correct; ---- var total = 0, n0 = 0, n1 = 0, + correct = 0, level = 0, score = 0, playerCorrect = 0; + + var level = 0, d=160; -- d should be 2 vars + ----- DRAW_MAX_X =0, DRAW_MAX_Y = 0; + var choices=[], score = 0, speed = 12000; --- + var choices=[]; + var timerSpeed = 12000; + var playerCorrect = 0, endTimerX = 80, startTimerY = 25, endTimerY = 100, offsetTimerY = 5; -------- - END_TIMER_X, END_TIMER_Y, START_TIMER_Y, OFFSET_TIMER_Y + END_TIMER_Y + START_TIMER_Y + var timerPaper, timerRect, chimpPaper, normalChimp, sadChimp, happyChimp, topLtBox, topRtBox, bottomLtBox, bottomMdBox, bottomRtBox; - var buttons=[]; - var stopTimer = false; -- isTimerStop - var chooseMe; - var createBox = function (paperName) { - var set, paper, box; ---- set, paper, box + -------------- + + var timerPaper, chimpPaper; + var timerRect; + var normalChimpImage, sadChimpImage, happyChimpImage; + var topLeftCard, topRightCard, bottomLeftCard, bottomMiddleCard, + bottomRightCard; + + + + + var buttons=[]; + var stopTimer = false; -- isTimerActive + var chooseMe; --- dispatchCardChoice + + var createBox = function (paperName) { ---- createCard + var set, paper; --- + var set; + var paper; + }; @@ -73,13 +96,13 @@ library.images var card = function (box, n, d) { ---- setCard() - var pos = []; - var x, y, flag; + var pos = []; --- positions + var x, y, flag; ---- flag -- isOverlapping var imgVarNames = {}; - var prefix = box["prefix"]; + var prefix = box["prefix"]; --- varPrefix - var addButtons = function(){ - var buttonNum = button.num; + var addButtons = function(){ + var buttonNum = button.num; --- numButton var mybutton = buttonNum ---- myButton -- cgit v0.9.1