# Need help with creating barriers/walls with boolean

**URL:** <https://discourse.processing.org/t/need-help-with-creating-barriers-walls-with-boolean/29444>\
**Category:** Coding Questions\
**Created:** [April 17, 2021, 1:39pm UTC](https://discourse.processing.org/t/need-help-with-creating-barriers-walls-with-boolean/29444 "2021-04-17T13:39:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Cherie](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@Cherie](https://discourse.processing.org/u/Cherie)\
**Post date:** [April 18, 2021, 12:53pm UTC](https://discourse.processing.org/t/need-help-with-creating-barriers-walls-with-boolean/29444/3 "2021-04-18T12:53:47Z")

</div>

> [@How do you create a wall?](https://discourse.processing.org/t/how-do-you-create-a-wall/873):
>
> Hi there! I’ve just started with Processing and am still learning. But I’ve ran into a problem already. This is my code: int xPos = 25; int yPos = 25; void setup(){ fullScreen(); } void draw(){ //This is the background color. background(75,75,75); //This is the player's controllable cube. fill(250,0,0); rect(xPos,yPos,15,15); //These are the controls for the player's cube. if(keyPressed == true){ if(keyCode == LEFT){ xPos += -2; } } if(keyPressed == true){ …

This is where I got the original code. Thanks for the reminder.

---

_[View the full topic](https://discourse.processing.org/t/need-help-with-creating-barriers-walls-with-boolean/29444)._
