Skip to content

Commit a9f55e6

Browse files
committed
correct bug collision
1 parent abbeb21 commit a9f55e6

File tree

6 files changed

+78
-80
lines changed

6 files changed

+78
-80
lines changed

halloffame/memory.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

memory/src/__javascript__/memory.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use strict";
2-
// Transcrypt'ed from Python, 2016-06-28 12:07:15
2+
// Transcrypt'ed from Python, 2016-06-28 12:36:56
33
function memory () {
44
var __all__ = {};
55
var __world__ = __all__;
@@ -1057,7 +1057,7 @@ function memory () {
10571057
var height = 512;
10581058
};
10591059
self.game = hexi (width, height, self.setup);
1060-
self.game.backgroundColor = '#898999';
1060+
self.game.backgroundColor = 'seagrean';
10611061
self.mouse = self.game.pointer;
10621062
self.mouse.tap = self.tap;
10631063
self.grid = Grid (self.game);
@@ -1113,7 +1113,7 @@ function memory () {
11131113
cellb.alpha = 0;
11141114
cella.alpha = 0;
11151115
if (contenta != contentb) {
1116-
setTimeout (resetcell (list ([cella, cellb])), 500);
1116+
setTimeout (resetcell (list ([cella, cellb])), 1000);
11171117
}
11181118
else {
11191119
spritea.showed = true;
@@ -1158,8 +1158,7 @@ function memory () {
11581158
self.check_endgame ();
11591159
self.get_curcell ();
11601160
if (self.mouse.tapped) {
1161-
var lc = len (self.clickedcells);
1162-
self.clickedcells.append (self.curcell);
1161+
(!__in__ (self.curcell, self.clickedcells) ? self.clickedcells.append (self.curcell) : null);
11631162
self.mouse.tapped = false;
11641163
self.compare_cells ();
11651164
}

0 commit comments

Comments
 (0)