-
checker board
Hi,
I'm to create a board alternating between black and white squares. The board's dimension is even random number of 10-20 squares by 10-20 squares. For instance, a board with the width of 14 squares and length of 16 squares. So far I'm having no problem... Now to the difficult part.
Imagine a line connecting the midpoint of the top side of board to the midpoint of the left side of the board. Every square (black or white) that this imaginary line intersects will turn into a red square.
Imagine 3 more lines: midpoint top to midpoint right, midpoint bottom to midpoint left, midpoint bottom to midpoint right. All with the same condition: every square (black or white) that this imaginary line intersects will turn into a red square.
If the board happens to be a square, I see the algorithm for drawing it. However, I stumped if the board is not a square. Any help is appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks