Inspiration
Two of our team members thought of a choose-your-own-adventure immediately when they heard the theme was space. We wanted to make a fun spacy adventure, with some space cowboys thrown in as well. The two members of our team that are learning Java had just learned about if-else statements and string formatting in class, so this felt like a manageable project.
What it does
This project is a huge branch of if-else statements, where each input the user gives leads the storyline down a different path.
How we built it
We used constructors to make the basic code for two inputs, three inputs, and four inputs, and we called that constructor in our main code. Each decision the user makes prints a statement determined by the constructor and returns a variable number corresponding to their decision, which the code then uses to decide what to ask them next.
Challenges we ran into
We weren't really sure how to use classes before this, so we did a lot of research and found out what constructors were and how to use them. We also weren't sure if we could actually use a constructor, since we have so much code within code with our branches, so one of our team members found out that returning a variable would solve this issue. Formatting was getting challenging with all the strings involved in our program, so we defined each one at the beginning to make it easier.
Accomplishments that we're proud of
We're very proud of learning how to use classes, and simply just making a program! This is our first coding project, and we are so glad that we learned so many things!
What we learned
We learned the difference between a class and a method, how to use constructors and return variables, and how to format strings. We gained confidence using Java in general.
What's next for Spaced Out
We had four main storylines: space cowboy, food critic, desk job, and drafted. We only got space cowboy finished (though we're hoping to get a good chunk of food critic done before the submission deadline), so what's next is to finish out those other three storylines.
Log in or sign up for Devpost to join the conversation.