Open bcambel opened 11 years ago
woo, how did you manage to do that? local setup or on irmingard.heroku.com?
on irmingard.heroku.com
thanks for reporting the bug. let me know if it ever happens again. cannot really explain it, though. have played the game myself a couple hundred times on Heroku and never had this problem.
cards get generated in app/assets/javascripts/setup/game.js.coffee (8 ff.):
IG.stack = new IG.Models.Stack(_id: 1)
decks = ['a', 'b']
suits = ['diamonds', 'spades', 'hearts', 'clubs']
cardsPerSuit = 13
_.each decks, (deck) ->
_.each suits, (suit) ->
_.times cardsPerSuit, (index) ->
card = new IG.Models.Card
deck: deck
suit: suit
value: index+1
column: null
pile: null
stack: true
position: IG.stack.get('cards').length
card.setSlug()
card.setImageAssetPath(gon.image_paths)
IG.stack.get('cards').add card
do you have any idea how a card might get generated twice? just for the record, what browser were you on?
chrome. I guess this will be a tough one to figure out..
hm, any further info on what you were doing just before the diamond 4 appeared twice? think it's rather an error in the JS code than the card shuffling / generation. probably a card somehow got duplicated / not properly moved from one column to another?!?
and as a general note, as you can tell by the occasionally faulty card highlighting, the app's not really optimized for Chrome.
Take a look at the Diamond 4 which is 2 times on the deck