Vinito99 Posted July 17, 2018 Share Posted July 17, 2018 Hi. I have been having some problems trying to configure .js files to work together in the canvas space. As of now i'm still a beginner in coding in canvas and would appreciate some help from anyone willing to look at my script so far. There are 3 attachments, one for the game board, one for all the html, and one for technically all the mechanics(although not much is there but tests). I'm just trying to figure out how to get the 2 .js files to cooperate. Any and all help is welcome please and thank you. Chess.html Game Board.js Game Canvas.js Quote Link to comment Share on other sites More sharing options...
b10b Posted July 17, 2018 Share Posted July 17, 2018 Hey, what's the problem exactly? 'Game Board.js' manages to pick up the reference to 'canvas' ok (using 'window' as the common container). Not saying that's a good idea, but it works as far as I can see? There are lots of alternative approaches for working with multiple js files (or using them as modules), so some background reading or exploration might be valuable? "js build tools", "js transpiler" are good starting search keywords. Quote Link to comment Share on other sites More sharing options...
Vinito99 Posted July 18, 2018 Author Share Posted July 18, 2018 Thanks. i did some searching and found out what was wrong. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.