Baby programming

This is so far the most advance thing I have written to date. It’s got variables, if/else statements and a random function :O omgosh.

Screen Shot 2013-09-03 at 1.24.22 PM

So basically what’s happing in this code is that I have some cake. And I want to randomise if the cake is safe to eat or not. So I have a random function picking either 1 or 2. If it picks 1 the cake is safe to eat.

I also have these doors that are connected to the cake. So there’s a door titled safe and a door titled¬†poisonous, now if the cake is safe you need to go though the safe door. For testing I’ve added these extra text so I know where the code is up too. This way I can make sure everything works fine.

Now that everything is working time to like gut it and place it into the game.

Big thanks to Jesse-face for helping me with the random function.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s