|
9 | 9 | use: true, |
10 | 10 | inputModes: { |
11 | 11 | edit: ["number", "clear", "info-blk"], |
12 | | - play: ["pin", "peke", "clear", "info-blk"] |
| 12 | + play: ["diamond", "peke", "clear", "info-blk"] |
13 | 13 | }, |
14 | 14 |
|
15 | 15 | mouseinput_auto: function() { |
|
43 | 43 | }, |
44 | 44 |
|
45 | 45 | mouseinput_other: function() { |
46 | | - if (this.inputMode === "pin") { |
| 46 | + if (this.inputMode === "diamond") { |
47 | 47 | this.inputdot(1); |
48 | 48 | } |
49 | 49 | }, |
|
67 | 67 |
|
68 | 68 | if (this.inputData === null) { |
69 | 69 | if (fixed !== undefined) { |
70 | | - this.inputData = cross.getPin() === fixed ? 0 : fixed; |
| 70 | + this.inputData = cross.getDiamond() === fixed ? 0 : fixed; |
71 | 71 | } else if (this.btn === "left") { |
72 | | - this.inputData = { 0: 1, 1: 2, 2: 0 }[cross.getPin()]; |
| 72 | + this.inputData = { 0: 1, 1: 2, 2: 0 }[cross.getDiamond()]; |
73 | 73 | } else if (this.btn === "right") { |
74 | | - this.inputData = { 0: 2, 1: 0, 2: 1 }[cross.getPin()]; |
| 74 | + this.inputData = { 0: 2, 1: 0, 2: 1 }[cross.getDiamond()]; |
75 | 75 | } |
76 | 76 | } |
77 | | - cross.setPin(this.inputData); |
| 77 | + cross.setDiamond(this.inputData); |
78 | 78 | cross.draw(); |
79 | 79 | } |
80 | 80 | }, |
|
84 | 84 | }, |
85 | 85 |
|
86 | 86 | Cross: { |
87 | | - getPin: function() { |
| 87 | + getDiamond: function() { |
88 | 88 | return this.qans ? 1 : this.qsub ? 2 : 0; |
89 | 89 | }, |
90 | 90 | overlapsDiamond: function() { |
|
107 | 107 | return cell.isNum(); |
108 | 108 | }); |
109 | 109 | }, |
110 | | - setPin: function(val) { |
| 110 | + setDiamond: function(val) { |
111 | 111 | if (val === 1 && this.overlapsDiamond()) { |
112 | 112 | return; |
113 | 113 | } |
|
301 | 301 | py = by * this.bh; |
302 | 302 |
|
303 | 303 | g.vid = "s_dot_" + dot.id; |
304 | | - var outline = this.getPinOutlineColor(dot); |
| 304 | + var outline = this.getDiamondColor(dot); |
305 | 305 | if (dot.qans === 1) { |
306 | 306 | g.lineWidth = (1 + this.cw / 20) | 0; |
307 | 307 | g.fillStyle = outline; |
|
323 | 323 | } |
324 | 324 | }, |
325 | 325 |
|
326 | | - getPinOutlineColor: function(dot) { |
| 326 | + getDiamondColor: function(dot) { |
327 | 327 | if (dot.trial) { |
328 | 328 | return this.trialcolor; |
329 | 329 | } |
|
335 | 335 | ? this.errcolor1 |
336 | 336 | : err === -1 |
337 | 337 | ? this.noerrcolor |
338 | | - : this.qanscolor; |
| 338 | + : this.quescolor; |
339 | 339 | } |
340 | 340 | }, |
341 | 341 |
|
|
351 | 351 | decodeData: function() { |
352 | 352 | this.decodeCellQnumAns(); |
353 | 353 | this.decodeCross(function(cross, ca) { |
354 | | - cross.setPin(+ca); |
| 354 | + cross.setDiamond(+ca); |
355 | 355 | }); |
356 | 356 | }, |
357 | 357 | encodeData: function() { |
358 | 358 | this.encodeCellQnumAns(); |
359 | 359 | // TODO remove crosses along edge |
360 | 360 | this.encodeCross(function(cross) { |
361 | | - return cross.getPin() + " "; |
| 361 | + return cross.getDiamond() + " "; |
362 | 362 | }); |
363 | 363 | } |
364 | 364 | }, |
|
0 commit comments