kasperpeulen / euclidthegame

A geometry game based on Euclid's Elements.
euclidthegame.org
MIT License
447 stars 74 forks source link

Level 10, 11, 12: all-tools medal overwrites primitive medal #288

Closed andersk closed 10 years ago

andersk commented 10 years ago

If I solve level 10 using the 5-move primitive solution, I’m awarded the primitive golden medal. If I then solve it using the 1-move all-tools solution, I should get a second golden medal—but what actually happens is that the second medal overwrites the first.

(I actually did this in the other order, and was confused that the 5-move primitive solution didn’t get me a second medal.)

Levels 11 and 12 have the same problem.

kasperpeulen commented 10 years ago

hmm I can't reproduce this on IE or firefox, both orders give me two medals

kasperpeulen commented 10 years ago

also on chrome, whatever I try, I always get 2 medals, after 2 runs, did you refresh the page for your secod run ? Because it is not yet supported to get 2 medals in one page session

andersk commented 10 years ago

Reproduced again in Chrome 36.0.1985.103 and Firefox 31.0 on Linux. Yes, I refreshed the page for the second run.

kasperpeulen commented 10 years ago

hm... really weird, I guess that I wrote some javascript code that doesn't work on linux for some reason

andersk commented 10 years ago

Aha: the problem is that it’s mistreating the click-on-three-points version of Compass as primitive. (The click-on-segment-and-point version of Compass is correctly treated as non-primitive.)

kasperpeulen commented 10 years ago

ah, I'll look at that

kasperpeulen commented 10 years ago

@andersk Ah, it was an easy fix luckily:

https://github.com/kasperpeulen/euclidthegame/commit/06246b59635d0d94a18d6531cddbd3829a75ad85

thanks for reporting!