diff --git a/ajax/labs/README.md b/ajax/labs/README.md new file mode 100644 index 0000000..cdce7ca --- /dev/null +++ b/ajax/labs/README.md @@ -0,0 +1,5 @@ +# Lab + +- Continue with the events lab, but now make a call to http://omdbapi.com/ as the user types +- Use the `t` query param to search for what the user has typed +- If a movie comes back, display its information in the page diff --git a/events/labs/README.md b/events/labs/README.md new file mode 100644 index 0000000..bf11287 --- /dev/null +++ b/events/labs/README.md @@ -0,0 +1,12 @@ +# Lab + +- Create an array of "movie" objects. +- Each movie object has properties like + - title + - release date + - rating + - director + - list of actors +- Create an input + - use the `keyup` event to grab the value of this input as the user types + - if the value of the input matches the title of a movie from your movies array, display that movie's info on your page somewhere diff --git a/html5/labs/README.md b/html5/labs/README.md new file mode 100644 index 0000000..9a139ef --- /dev/null +++ b/html5/labs/README.md @@ -0,0 +1,5 @@ +# Lab + +- Continue with the AJAX lab +- Add the ability so that, if the user's computer loses connection, the value of the input that user is typing into is saved in `localStorage` +- When the user comes back online, have the browser make a call to OMDB in order to see if a movie has been found diff --git a/modular_js/labs/castle.md b/modular_js/labs/castle.md new file mode 100644 index 0000000..f34b1a8 --- /dev/null +++ b/modular_js/labs/castle.md @@ -0,0 +1,60 @@ +# Castle Battle! + +## Classes + +### Player + +- This is a two Player game (one human and one computer) +- Each Player has a Barracks (see below) +- Each Player starts with 10 hit points + +### Barracks + +- A Barracks can generate a Peon (see below) +- A Barracks keeps a list of its generated peons + +### Peon + +- A Peon has a name +- A Peon has a job, one of the following: + - nothing (this is the initial value upon creating a peon) + - repair + - attack + +--- + +## Flow of game: + +1. At the start of player's turn, ask what the user wants to do (one of the following) + - Create a peon + 1. If chosen, ask what the peon's name should be + 1. Have the player's barracks generate a peon with the correct name + - Select a peon + 1. If chosen, ask which peon they want to select + 1. Once a peon is chosen, ask what action the peon should perform + - attack + - If chosen, set the peon's job to attack + - repair + - If chosen, set the peon's job to repair +1. Once this is complete, loop through the peons in the player's barracks + - If a peon's job is to repair, increase the user's hit points by one + - If a peon's job is to attack, decrease the computer's hit points by one +1. Once this is complete, start the computer's turn + - Choose a random number from 0-2 + - 0: computer does nothing + - 1: computer repairs itself + - increase computer hit points by one + - 2: computer attacks player + - decrease player hit points by one +1. Evaluate the state of the game: + - If the computer has 0 or fewer hit points, you win + - If you have 0 or fewer hit points, the computer wins + - If you both have 0 or fewer hit points, it's a tie + - If you both have more than 0 hit points, start player's turn over again (step 1) + +## Hungry for more? + +1. Make it so that the computer doesn't randomly attack/repair/do nothing itself. Instead, it will act like a player and either create a peon or, if a peon already exists, select a random peon and tell it to either attack or repair +1. Make the 2nd player optionally be either the computer (random decisions) or another human +1. Repairs increase hit points a random number between 0-3 +1. Attacks decrease hit points a random number between 0-3 diff --git a/modular_js/labs/landscaper.md b/modular_js/labs/landscaper.md new file mode 100644 index 0000000..39122c3 --- /dev/null +++ b/modular_js/labs/landscaper.md @@ -0,0 +1,19 @@ +# Landscaper! + +1. You are starting a landscaping business, but all you have are your teeth. +1. Using just your teeth, you can spend the day cutting lawns and make $1. You can do this as much as you want. +1. At any point, if you are currently using your teeth, you can buy a pair of rusty scissors for $5. You can do this once, assuming you have enough money. +1. Using the rusty scissors, you can spend the day cutting lawns and make $5. You can do this as much as you want. +1. At any point, if you are currently using rusty scissors, you can buy an old-timey push lawnmower for $25. You can do this once, assuming you have enough money. +1. Using the old-timey push lawnmower, you can spend the day cutting lawns and make $50. You can do this as much as you want. +1. At any point, if you are currently using the old-timey push lawnmower, you can buy a fancy battery-powered lawnmower for $250. You can do this once, assuming you have enough money. +1. Using the the fancy battery-powered lawnmower, you can spend the day cutting lawns and make $100. You can do this as much as you want. +1. At any point, if you are currently using the fancy battery-powered lawnmower, you can hire a team of starving students for $500. You can do this once, assuming you have enough money. +1. Using the the team of starving students, you can spend the day cutting lawns and make $250. You can do this as much as you want. +1. You win the game when you have a team of starving students and $1000. In this situation, send a message to the user telling them, they've won. + +## Hungry for more? + +1. Add the ability to reset the game at any point so that you can play again +1. Make it so that a user can have multiple tools, and money earned each day is increased appropriately (e.g. 2 scissors, and an old-timey push lawnmower means you earn $60/day ) +1. Once you've implemented multiple tools, make it so you can sell tools for half price