# How to hide and show player in board?

**URL:** <https://discourse.processing.org/t/how-to-hide-and-show-player-in-board/23582>\
**Category:** Coding Questions\
**Created:** [August 31, 2020, 12:06pm UTC](https://discourse.processing.org/t/how-to-hide-and-show-player-in-board/23582 "2020-08-31T12:06:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xremix31](https://avatars.discourse-cdn.com/v4/letter/x/ba8739/32.png) [@Xremix31](https://discourse.processing.org/u/Xremix31)\
**Post date:** [August 31, 2020, 12:06pm UTC](https://discourse.processing.org/t/how-to-hide-and-show-player-in-board/23582/1 "2020-08-31T12:06:40Z")

</div>

Hi,  
I have a problems in my game like monopoly.  
I created the board and the players inside the setup and did the sprite in the draw. The problem is that every time I launch the data, the player is visible in the position of the data numbers. to solve the problem I tried to create a function that overlaps the board with each click on throwing dice but this creates problems afterwards when creating the leaderboard because they overlap the elements above the leaderboard.

Is there a better way to do this process of switching from visible to invisible players?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 31, 2020, 1:01pm UTC](https://discourse.processing.org/t/how-to-hide-and-show-player-in-board/23582/2 "2020-08-31T13:01:07Z")

</div>

When this is a 2D game the order in which you draw matters.

Draw board then draw the players

When you want to show your leader board set a flag to true indicating this.

Now make a if clause with the flag around the part where you display the players. And don’t show the players when your flag is true
