parent
5db08b2ef1
commit
fbdca5ee14
@ -0,0 +1,155 @@
|
||||
# Landscaper
|
||||
|
||||

|
||||
|
||||
You'll be creating a simple, terminal game to send messages and receive input from the user.
|
||||
|
||||
#### Learning Objectives
|
||||
|
||||
- Putting everything you've learned so far together (arrays, loops, conditionals)
|
||||
|
||||
#### Prerequisites
|
||||
|
||||
- JavaScript (arrays, loops, conditionals)
|
||||
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Inside of the student_labs directory there is already an `app.js` set up and ready to go!
|
||||
|
||||
## 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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can use teeth to cut grass"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can buy scissors"
|
||||
<hr>
|
||||
|
||||
1. Using the rusty scissors, you can spend the day cutting lawns and make $5. You can do this as much as you want.
|
||||
|
||||
<hr>
|
||||
🔴 Commit: <br>
|
||||
"Landscaper App: user can use scissors to cut grass"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can buy push lawnmower"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can use push lawnmower to cut grass"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b><br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can buy battery-powered lawnmower"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can use battery-powered lawnmower to cut grass"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can hire a team"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: user can use a team to cut grass"
|
||||
<hr>
|
||||
|
||||
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.
|
||||
|
||||
<hr>
|
||||
🔴 <b>Commit your work!</b> <br>
|
||||
Your commit message should read something like: <br>
|
||||
"landscaper: win scenario"
|
||||
<hr>
|
||||
|
||||
## Technical Requirements
|
||||
1. Your landscaper game *must* run on with no syntax errors
|
||||
1. If there are errors you can't solve, comment them out and leave a comment above it explaining what is wrong
|
||||
|
||||
## 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
|
||||
|
||||
#### Super duper hungry more?: Landscaper Inspiration
|
||||
|
||||
1. Make your terminal game playable via the DOM!
|
||||
|
||||
1. Some of our students went above and beyond doing exactly that! See below for some examples:
|
||||
|
||||
<details><summary>Student One</summary>
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
</details>
|
||||
|
||||
<details><summary>Student Two</summary>
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
</details>
|
||||
|
||||
|
||||
<details><summary>Student Three</summary>
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
*Copyright 2018, General Assembly Space. Licensed under [CC-BY-NC-SA, 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)*
|
||||
@ -0,0 +1,28 @@
|
||||
|
||||
# Hangman
|
||||
|
||||
#### This lab is NOT a DELIVERABLE
|
||||
|
||||

|
||||
|
||||
#### Prompt
|
||||
> Build an program that runs in the terminal and allows a user to play hangman using a word randomly selected from a list of words you create.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Create a file called `hangman.py`. This is where you'll write your hangman program.
|
||||
|
||||
1. To run your program, type `python3 hangman.py`.
|
||||
|
||||
|
||||
## Requirements
|
||||
- The computer should randomly select a word from a list of words you create.
|
||||
- The user should be prompted with the length of the word they are trying to guess.
|
||||
- The user should have a limited number of guesses. If they don't guess the word correctly within the allotted number of guesses, the program should supply a lose statement.
|
||||
- The program should prompt the user with how many guesses they have left after each guess they make.
|
||||
- User should be able to see what letters they have guessed correctly and what letters they have guessed incorrectly.
|
||||
- If the user guesses all of the letters in the word, they should be shown a win statement.
|
||||
|
||||
## Hungry For More?
|
||||
- When the user wins or loses, ask them if they'd like to play again.
|
||||
- Consider the edge cases. What could a user do that could potentially break the program?
|
||||
@ -0,0 +1,58 @@
|
||||
# Castle Battle!
|
||||
|
||||
## Summary
|
||||
|
||||
We're making a turn-based strategy game. Two sides take turns battling each other
|
||||
|
||||
### 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 store Peons (see below)
|
||||
|
||||
### 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. Add a peon with the correct name to the player's barracks. Set its job to 'nothing'
|
||||
- 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 of hit points from 1-5
|
||||
- The computer either repairs itself for that number of hit points or damages you for that number of hit points
|
||||
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 you/repair itself directly. 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 your hit points by a random number between 1-3
|
||||
1. Attacks decrease the enemy's hit points by a random number between 1-3
|
||||
1. Create additional combatants (CPU or human) that can attack other combatants/repair themselves
|
||||
Loading…
Reference in new issue