mhtess / gen-games

Games for eliciting generalizations in language
1 stars 2 forks source link

Clean up mp-game-1.js #25

Closed mhtess closed 7 years ago

mhtess commented 7 years ago

Currently there is a lot of stuff in mp-game-1.js that shouldn't be there.

  1. There are a lot of functions prepending to the top of the file; these should be in some client utils (perhaps in sharedUtils.js?)
  2. Stimuli specific information, e.g., information displayed to participants about the critters. Some of this should be abstracted / generalized. As well, anything particular to the stimuli should in game.core. Finally, lines like 301 create_table(2,6,"critter_test_display"); should be generalized (what is 2? what is 6?)
mhtess commented 7 years ago

Also, line 337:

"selected" : $('#cell' + i).css('border') == '2px solid rgb(255, 0, 0)' ? "true" : "false"

that's pretty haggard. this will break if we change the css. Should make a function that gets called whenever they click on something, and updates an array of whether or not the object was clicked..