This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

creation of dynamic chessboard with user interactivity using javascript.

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my plan as of how to develop a code which can be used to play game of chess on a webserver .
I am trying to develop this piece of code for correspondence chess.
I know the basics of JS and made this a hobby project in order to learn some more details of js.

Few things about the code.
code at present, just displays the board with pieces and on clicking on the board, displays the id.
Here is the full code for the html file Html file
Here is the full code for the js fileJavaScript File

I have also created an 2d array for the board as later on I want all the data to be fed to my database.
There are two difficuties for me:
1.) is is there any way by which I can integrate html,css and js such that I can use the array to place the pieces on the GUI.
2.)How can I make these pieces movable.(Once I am able to move the pieces, then I can start coding the legal moves,at this point I just want to change the position of pieces by clicking them and then on a square and then this entry must be redirected to array to get the latest position.)




 
security forum advocate
Posts: 229
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pointers to the solution --

well, usage images for each of your peices...
when a move is made, validate it and then relay/render the 2 table data elements...

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic