Jump to content

Requesting help making a chess game in canvas


Vinito99
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...