0

Hi. Im a beginner with HTML CSS Javascript and i want to build a checkers game. What is the best way?

I was thinking of useing a table as the borad and circle images as the pices. Im not sure if it will work is there a better way to do it. Can someone please judjest something? Thank you!

7th Mar 2020, 9:05 PM
jacob lipsky
jacob lipsky - avatar
8 Respostas
+ 1
Thanks a lot. I'll try it.
8th Mar 2020, 4:42 AM
jacob lipsky
jacob lipsky - avatar
+ 1
Hey man thanks for the help. Im now looking to insert javascript by using the DOME how can i enter he elements such as a table into a var so i can start working with it?
9th Mar 2020, 8:32 AM
jacob lipsky
jacob lipsky - avatar
+ 1
How do you mean? Enter the elements where exactly?
9th Mar 2020, 8:50 AM
HonFu
HonFu - avatar
+ 1
Can you link us the code maybe? You can set up a simple web code here on Sololearn directly, with HTML, CSS and Javascript. That would make it easiest for us to take a look and help you find the problem.
9th Mar 2020, 9:01 AM
HonFu
HonFu - avatar
0
For my chessboard, I pushed a bunch of divs into a div and looked up unicode chars to put in there. That was an easy-to-handle, lazy solution. Probably you can find some unicode signs that look like black and white stones. In my go board, I drew circles on a canvas. That was a bit messier to do. Feel free to riff on these patters if they work for you. Excited to see what other people suggest. (In the chess board I used Brython for the Javascript part, but it doesn't look very different in JS. I basically appended the field divs, gave them style attributes and an id, stored the reference to each field and finally added a 'click' event listener to them. If you get into trouble with that, we can sort that part out.) https://code.sololearn.com/W5v76nCjupV7/?ref=app https://code.sololearn.com/W1VLQ6PKTm6j/?ref=app
7th Mar 2020, 10:18 PM
HonFu
HonFu - avatar
0
I made a checker board using a table and uni code. I want now to start programing the javascript in an external ".js" page while using the DOME. -The table has an id "board". And i started off by coding : var t = document.getElementById("board").innerHTML; but gives me an error. How can i code it?
9th Mar 2020, 8:58 AM
jacob lipsky
jacob lipsky - avatar
9th Mar 2020, 9:57 AM
jacob lipsky
jacob lipsky - avatar
0
This is the code i started
9th Mar 2020, 9:57 AM
jacob lipsky
jacob lipsky - avatar