Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 1 Create a file called checkers.html containing HTML, CSS, Javascript, and SVG that shows a 10 by 10 checker board game. The Javascript should
Exercise 1 Create a file called checkers.html containing HTML, CSS, Javascript, and SVG that shows a 10 by 10 checker board game. The Javascript should be able to create any valid checker board game with the board and all of the pieces in play. The configuration of playing pieces can be described with 10 lines with 10 characters: -W-W-W-W-W W-W-W-W-W- -W-W-W-W-W W-W-W-W-W- - - - - - - - - - - - - - - - - - - - - -B-B-B-B-B B-B-B-B-B- -B-B-B-B-B B-B-B-B-B- A - character denotes an empty square, W a white piece, and B a black piece. The above configuration is the starting position in international checkers. Another game configuration is: -W-W-W-W-W W-W-W-W-W- -W-W-W-W-W W-W-W-W--- --------- --B------ -B---B-B-B B-B-B-B-B- -B-B-B-B-B B-B-B-B-B- A Javascript function should accept a string containing a game configuration, and the ID of a div element and create a depiction of the checkers game using HTML, CSS, and SVG. The solution must containing the following features: a Javascript function that creates a game, SVG must be used to draw a checker game piece, the colour of the dark and light squares in the checker board must be controlled by CSS, the colour of the dark and light pieces must be controlled by CSS, the size of a square on the board must be controlled by CSS. The checkers.html should show five different checker games. All of the SVG, CSS, HTML, and Javascript must be in the checkers.html file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started