Closed christianbundy closed 6 years ago
I also seen a:
ReferenceError: otherPlayer is not defined
at Object.keys.forEach (/home/happy0/projects/ssb-chess/ssb_ctrl/game.js:203:29)
Thanks for getting this underway, btw :)
Thanks for taking the time to give me feedback! I pushed some new code that seems reasonable in every way, except I had to switch the ++
and --
logic for the piece graveyard. At first glance I'm not sure I completely understand the logic behind the code, but the original code was resulting in negative integers being passed to R.repeat()
. Any idea why that might be? The fact that flipping the logic fixed the error is weird.
Oops, nevermind. Apparently I'd originally replaced --
with +=
and ++
with -=
, which of course caused errors. I can play chess with electron main.js
now!
Scratch that. I can open the app with electron main.js
but it's currently not letting me play any moves. Hmm.
Another edit! It looks like I'm unable to make moves when using electron main.js
, and the green circles don't show up showing my possible moves, but when I use the code in Patchbay everything seems to work perfectly. Any idea what might be happening there?
I've checked out your branch and I'll see if I can reproduce the electron moves issue :) (once I have someone to move against :P)
@christianbundy I can move fine when I'm on your branch (and using ./node_modules/electron/dist/electron main.js
).
You getting any errors in the developer console?
No errors, weird! I'll update if I notice anything else funky, thanks for the merge. :deciduous_tree:
Continued the cleanup from before, lots of manual tinkering but everything still looks right. I haven't tested this (other than
npm test
), but this removes a lot of dead code. Here are the things I was scared of and didn't touch:eqeqeq
: Ideally we'd be using===
instead of==
, but I'm not familiar enough to know where that's trivial and where it's going to be a giant hairballimport/no-extraneous-dependencies
: ESLint really wants us to install everything werequire()
, so requiring Electron inmain.js
complains that Electron shouldn't be a devDependency. Maybe it's correct? I'm not familiar enough.no-param-reassign
: didn't have time to change these, although I might have a clever fix for it.no-use-before-define
: basically just organizing functions so that they only call functions later in the file -- I'm pretty sure a computer could do this pretty well but my human brain is bad at it.Let me know if you see anything funky!