Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Need suggestions/feedback for further improvements :-)

Hi,

I'm working on a chemistry game, about alkanes, for people to learn the names and formulas of the alkanes - mainly people who study chemistry in high-school (or people who wants a refresher) :-)

I'm currently looking for new ways to improve the game :-)

https://henrikac.github.io/alkane-game/

PS. I am aware that it's not very mobile-friendly at the moment.

4 Answers

Steven Parker
Steven Parker
243,200 Points

A few observations and suggestions:

  • somtimes it took more than one click to get a choice to be scored (both right or wrong)
  • even after coosing a correct answer, you can still pick wrong ones
  • after choosing a wrong answer, you can still pick the right one (but perhaps that is intended?)
  • clicking again on a previously chosen correct answer still improves your score (I got 100 points!)
  • clicking on a previously chosen wrong answer reduces the score futher
  • when hovering over a button, the cursor could change to a pointer

Looks very nice. I haven't looked at the code but you can make it more interactive and display new question after first one was answered so you can see only one question at the time. It will even be more mobile-friendly because you will show only one question on the screen without the need of scrolling down.

Steven Parker good suggestions

For one-time event handlers u can use removeEventListener or if you use jquery there is one() function you can look up.

Steven Parker
Steven Parker
243,200 Points

It sounds like you answered your own question. By using ".one" to establish a handler, it will operate just one time and won't need to be explicitly removed.

Those are some very good suggestions and I really had not thought of those, thank you Tobiasz Gala and Steven Parker :-D

  • somtimes it took more than one click to get a choice to be scored (both right or wrong): I didn't really experience this before but now it happens from time to time, but I have no idea why it's behaving like that.

  • clicking again on a previously chosen correct answer still improves your score (I got 100 points!): Woops, this will be fixed asap :-P