# Help with drawing checker board

**URL:** <https://discourse.processing.org/t/help-with-drawing-checker-board/5214>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [November 5, 2018, 3:10am UTC](https://discourse.processing.org/t/help-with-drawing-checker-board/5214 "2018-11-05T03:10:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpevehou](https://avatars.discourse-cdn.com/v4/letter/g/c6cbf5/32.png) [@gpevehou](https://discourse.processing.org/u/gpevehou)\
**Post date:** [November 5, 2018, 3:10am UTC](https://discourse.processing.org/t/help-with-drawing-checker-board/5214/1 "2018-11-05T03:10:08Z")

</div>

For my assignment, we have to create a chess board on a canvas so that it doesn’t take up the full canvas. However, all I can create is one that does not look completed. Each square must be 30_30 and it is an 8_8 board. I can only attach one image per post, so I have the results attached in this post and the the code itself is in the comments.

 ![chess%20board%20result](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3a54dd927509184c005f5638a674d4d65786fa43.jpeg)

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 5, 2018, 3:45am UTC](https://discourse.processing.org/t/help-with-drawing-checker-board/5214/3 "2018-11-05T03:45:29Z")

</div>

If the parts have to be 30 in size, then you should replace the size in rect() with 30 and 30. That should reduce the problems. Also, please send Code as text, not image, because this is difficult to read and doesn’t cover the whole code…  
Just copy past the code here, inside the ‘’’ created by pressing the \</\> sign.

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [November 5, 2018, 6:46am UTC](https://discourse.processing.org/t/help-with-drawing-checker-board/5214/4 "2018-11-05T06:46:36Z")

</div>

> [@Lexyth](#):
>
> Also, please send Code as text, not image, because this is difficult to read and doesn’t cover the whole code…

And mainly, we can’t just copy paste it to try it out!

---

<div class="post-metadata">

**Author:** ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)\
**Post date:** [November 5, 2018, 7:22am UTC](https://discourse.processing.org/t/help-with-drawing-checker-board/5214/5 "2018-11-05T07:22:09Z")

</div>

@gpevehou Also, make sure your code doesn’t have any dependent libraries, which i think your code is pretty straight forward.
