Hackathon Adventure

As we round out our month of front-end development (I can't believe it we've come this far) our final task is to collaborate on a project. We've been challenged to complete a 48 hour Hackathon with the theme of 'Mashup'. My group has picked an arcade-style page that includes multiple mini games that are all interactive and show off various skills we've learned. My particular mini game is a Choose Your Own Adventure game, or as it turns out, a Tour of Iron Yard with Stacey our Campus Director!

I'm not as advanced as I would like to be but the logic I implemented to complete the task worked! It got pretty messy pretty fast but I was able to accomplish a series of alerts nested in one another. My tour is three rooms long and once you 'enter' a room it can not be reentered. I did this using nested if statements linked to dialogue boxes with template literals. This worked great but if I ever decided to add additional rooms it would get close to impossible to sort out what goes where. So I'm spending the day today making my code a little more advanced to challenge myself to add additional rooms. Let me show you what I had in my 'Rough Draft' first!


That chunk of code is repeated two more times for the each additional option when you first start the tour. Now, instead of nested ifs, I'm going to attempt to create a function that calls into an array. In order to keep the ability to never re-enter a room I'll have to include some loops to make sure options are reduced as rooms have been entered. I think I'm on to something!

Comments

  1. We have experienced consistent vertical growth due to our efficient and practical strategy. web development raleigh

    ReplyDelete
  2. Citadel Infotech and our global network can provide a solution that makes sense for you. raleigh web development

    ReplyDelete

Post a Comment