Goal: Continue to practice building Spark applications that persist data in a database, including following best practices for routing, database naming, database relationships, and thorough testing using Behavior-Driven Development. Additionally, begin to get comfortable translating user stories into tangible application features.
Before beginning the main project below, follow along with last night's homework to integrate objects within objects and editing routes (with corresponding tests!) into your To Do List application. Once you can successfully update
Task objects, add similar functionality for updating
Make a program for an animal shelter that tracks animals up for adoption, and potential owners that have visited the shelter. Build out the following user stories. As with your previous projects, don't focus on different user roles, focus on implementing the behaviours you'll need to complete each user story.
If you and your partner feel comfortable integrating objects within objects into Spark and are ready for a more complex challenge, create one of the following games. As always, make sure to follow the Red, Green, Refactor BDD Workflow, and integrate RESTful routes. Also, don't worry if you don't fully complete your game today. You can continue work on this Thursday, if you complete your two-day project with time to spare.
Create an app that allows you to recruit a well-balanced team of superheroes (or any other character-type of your choosing).
Hero object: At the very least, they should have a name, age, special power and weakness. Special powers and weaknesses could be freely assignable or you may offer users a predetermined set to choose from.
Squad object: They should have a max size, name, and a cause they're are dedicated to fighting (sexism, computer illiteracy, not covering your mouth when you sneeze, hogging bus seats with your backpack, passive aggressive post-it notes, etc).
Allow users to assign
Heros to a
Squad. Each hero can only participate in one
Squad at a time.
You could even calculate scores for a specific skill area for your squad (defense, distance attacks, etc), or begin to integrate a turn-based battle system. Get creative! This could be the start of a fun portfolio piece!
Make a game where two people can play the card game Go Fish with each other. If you're not familiar with the rules of Go Fish, check out it's entry on Wikipedia here.
Game object: This should hold the multiple
Players participating, and methods for dealing cards, changing turns, determining a winner, etc.
Player object: At the very least this should contain the player's hand of cards, and their name. You could keep track of how many wins and losses a player has too.
The Nested Looping lesson from week one may assist in constructing a virtual deck of cards.
Also, take a peek at Oracle's documentation for the
Collection.shuffle() method. It may come in handy for "dealing" your virtual cards.