Giter VIP home page Giter VIP logo

landscaper's Introduction

General Assembly Logo

Landscaper

studio ghibli landscape

You'll be creating a simple, browser-based JavaScript game that utilizes alert() and prompt() 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

  • Fork and Clone this repositrty
  • In this directory, create an index.html and app.js files.
  • Connect your app.js file to your index.html file. Write some sort of console.log() in your app.js and open up your index.html file in the browser to check if you've connected your files correctly
  • Now that you're all set up, using JavaScript, simluate the following simple game:

Landscaper

  1. You are starting a landscaping business, but all you have are your teeth.

  2. Using just your teeth, you can spend the day cutting lawns and make $1. You can do this as much as you want.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can use teeth to cut grass"
  3. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can buy scissors"
  4. Using the rusty scissors, you can spend the day cutting lawns and make $5. You can do this as much as you want.


    ๐Ÿ”ด Commit:
    "Landscaper App: user can use scissors to cut grass"
  5. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can buy push lawnmower"
  6. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can use push lawnmower to cut grass"
  7. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can buy battery-powered lawnmower"
  8. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can use battery-powered lawnmower to cut grass"
  9. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can hire a team"
  10. 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.


    ๐Ÿ”ด Commit your work!
    Your commit message should read something like:
    "landscaper: user can use a team to cut grass"

11 . 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>
&#x1F534;  <b>Commit your work!</b> <br>
Your commit message should read something like: <br>
"landscaper: win scenario"
<hr>

Deliverables

For this section of the homework, inside the landscaper folder you should have an index.html and app.js that simulates the landscaper game outlined above. Your app must have:

  • The ability to take user input
  • The ability for the user to earn money
  • The ability to buy tools and use the new tool
  • The ability to win the game and end it
    • Hint: Try setting the win amount to $10 frst, then $50, and etc. until you get to the end to allow for easier testing!

Technical Requirements

  • Your landscaper game must run on first load with no syntax errors
  • If there are errors you can't solve, comment them out and leave a comment above it explaining what is wrong

Submission Guidelines

  • Make a pull request and title the PR <yourname>-<your point person's name>

Hungry for More?

  • Add the ability to reset the game at any point so that you can play again
  • 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 )
  • Once you've implemented multiple tools, make it so you can sell tools for half price

Super duper hungry more?: Landscaper Inspiration

  1. Try making your game playable via the DOM via buttons or input forms as opposed to using the console and alerts and prompts!

  2. Some of our students went above and beyond for this homework doing exactly that! See below for some examples:

Student One

first screen

buying tools

end

Student Two

first screen

options

more options

buying tools

more options

end

Student Three


Copyright 2018, General Assembly Space. Licensed under CC-BY-NC-SA, 4.0

Adapted from SEI-MAE

landscaper's People

Contributors

granddivino avatar taylordarneille avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.