Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Fiestón {
- public $restroom_status = 0;
- public $restroom_refresher_shots_available = 1000;
- public $restroom_stink = 0;
- public function restroom($person) {
- if ($this->restroom_status==0) {
- $this->restroom_status = 1;
- while ($person->bladder>0) {
- sleep(1);
- }
- while ($person->bowels>0) {
- sleep(1);
- }
- $person->exit_premises(true);
- $this->restroom_status = 1;
- $this->restroom_refresh();
- return true;
- } else {
- return OCCUPIED_TRY_LATER;
- }
- }
- public function restroom_refresh() {
- if ($this->restroom_refresher_shots_available>0) {
- $this->restroom_refresher_shots_available--;
- return true;
- } else {
- $this->restroom_stink++;
- return false;
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement