I’m sure I’m just doing something silly and will smack my head when I get it figured out, but I’m stumped, and hope maybe you can point me in a productive direction.
I have a two player game (just playing rock, paper, scissors) which mostly seems to be working as I’d like. At the very end, though, it’s supposed to display a page giving the player’s final score, with a “next” button, which is supposed to then redirect elsewhere (into Qualtrics). But when I get to that page it just briefly flashes the page without waiting for the user to read it or press the button, and then appears, like Wagner’s ring cycle, to go right back to the beginning, thus,

I’ve instrumented the relevant function in logic.js and nothing in there seems to be being called. I’ve tried doing the same in player.js, but when it does its go back to the beginning thing the console in the browser gets overwritten so I’ve no idea what’s being spewed there.
Any thought on what causes something like this, and where I should look for my stupidity?
Thanks!
—
Don Morrison df...@cmu.edu
“Mathematicians are machines for turning coffee into theorems.”
– Alfréd Rényi
On Mon, Aug 14, 2023 at 9:38 PM Don Morrison df...@cmu.edu wrote:
At the very end, though, it’s supposed to display a page giving the
player’s final score, with a “next” button, which is supposed to
then redirect elsewhere (into Qualtrics). But when I get to that
page it just briefly flashes the page without waiting for the user
to read it or press the button, and then appears, like Wagner’s
ring cycle, to go right back to the beginning, thus,
Oh, maybe it’s supposed to do that?
So, my normal development cycle is to open a couple of browser panes, and on each iteration after nodemon restarts the game I refresh the panes, which seems to work fine. Except I now see that it is only in this case that I get that flash of death as Valhalla burns and I go back to the beginning; if instead I type in fresh URLs way back when I start, then when I get to the end I am allowed to see my end screen!
So I guess I don’t really have anything to fix, I just have to recognize that my development cycle ritual is not suitable for testing the end game. I do wonder why not though. I’m guessing you can probably tell me!
Thanks, and sorry to have bothered you.
—
Don Morrison df...@cmu.edu
“‘To say that Benedict Farley makes pies is like saying that Wagner
wrote semiquavers.’ ‘Oh, they’re good pies, are they?’ ‘No, horrible.
But there are a great many of them.’”
– Clive Exton, after Agatha Christie, The Dream
--
You received this message because you are subscribed to the Google Groups "nodeGame" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodegame+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodegame/CAO9hiFXTjtyOuYthqWjR_55rjhA3vQiyukr5nPEh0pcryE73rw%40mail.gmail.com.
On Tue, Aug 15, 2023 at 4:15 AM Stefano B stefanoba...@gmail.com wrote:
I am not sure, but perhaps nodemon is looking for changes in the
game directory and as you save the results of the game, it restarts
it?
Ah, a clever thought, though sadly not borne out by the evidence: when nodemon restarts things (which I think it does only when it sees a change to a .js file) it leaves a trace in the console spew, and there is none.
However, just for fun, I’ll try it without nodemon and see what I see. Perhaps nodemon is interfering in some other way.
Thanks!
—
Don Morrison d...@ringing.org
“There are men whose sense of humour is so ill developed that they
still bear a grudge against Copernicus because he dethroned them
from the central position in the universe.”
– W. Somerset Maugham, A Writer’s Notebook
--
You received this message because you are subscribed to the Google Groups "nodeGame" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodegame+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodegame/CAO9hiFWt0Qw%2BmUC%2BYRNzVP3QN%3Dt7CrUo6%2B5eaUenqsMpsORwkg%40mail.gmail.com.