Checkers: Setting the Board

  • View
    21

  • Download
    0

Embed Size (px)

DESCRIPTION

Checkers: Setting the Board. - PowerPoint PPT Presentation

Text of Checkers: Setting the Board

Tic Tac Toe: Getting Started

Checkers: Setting the BoardCheckers and chess use an 8 by 8 board. Each box on the board alternates colors with the box next to it. The designer may choose whichever colors they want. Create two different colors on two different files using the paint brush program. The game will need the two colored squares to create a board. Creating the htmlFor this assignment we will be using 64 img commands. The img commands will be created with HTML code. Each line of images will have 8 small boxes that appear on the screen. Notice that the next line starts with a different color than the previous line started with. In HTML, one way to get a new line is the
command. This will break the line into two different lines for appearances. Function setBoard() explanationThe function shows an example of how to display two boxes. However, this game requires 64 boxes. Use for loops to have the code repeat. Their should be two separate loops, one inside or nested inside the other. Create the board

//use JavaScript create the board in HTMLcount=0;for(a=0;a