GithubHelp home page GithubHelp logo

neoplants's People

Contributors

julienfitz avatar

Watchers

 avatar

neoplants's Issues

Make errors display properly on the views

There are validations in place on all Plant attributes. The desired behavior is for errors to display at the top of the current page whenever an attempt is made to update a Plant with an invalid attribute. The current behavior is that the screen goes completely blank.

Offer different kinds of plants and display them on the plant show page

Let's give several options of types of plant (cactus, fern, tulip, tomato plant, etc.).
We can display either a picture of the type of plant on the plant show page, or maybe ASCII art!
We can alter the plant's behavior based on the type of plant (cactuses can go a long time without water, for example).

Prevent plants from being zombies

A plant dies when it reaches zero health. Currently, you can resurrect it by giving it more food, water, etc. and then passing the time by a day. Once a plant is dead, it should be gone forever, so let's make it unalterable once it's dead.

  1. add alive field to DB, with default: true
  2. whenever a plant reaches 0 health, alive: false
  3. early return in update if plant is not alive
  4. remove ability to update plant on front-end if plant is not alive (remove links)

Add a worker to update plants on a schedule

Current behavior is that the "current time" for the plant is set at creation and is just the time the plant was created, then the user has to move time forward by clicking the "Fast-forward" button. Desired behavior would be to add a background job to update the "current time" regardless of user interaction. The background job will move time forward by one day every 30 minutes so the plant will progress automatically and encourage more frequent user interaction.

Add info about how long a plant has been alive + affirmations

The plant show page should show in plain English how long the plant has been alive, in days.
The plant show page should also display an affirmation based on how long the plant has been alive. The longer a plant has been alive, the more intense the affirmations become! These can be the equivalent of a "badge" or "trophy", so users can accumulate affirmations. The plant show page would then show a five-day affirmation on day 5, then on day 10 it will show both a ten-day affirmation with the five-day affirmation underneath, and so on.

  1. Create a hash on the Plant model with affirmations for different amounts of time (start with 5, 10, 15, 30 days) (consider moving this to its own Affirmations model later)
  2. Add time_alive method to Plant class that returns an integer for how long the plant has been alive, in days
  3. On show page, at the top, render #{@plant.name} has been alive for #{@plant.time_alive} days
  4. Under that, display the affirmations according to how long the plant has been alive. Display all affirmations from most to least recent.

Add ability for plants to grow / change size

If a plant is continuously in a good mood and has good health over a given period of time, it should grow! Let's add a size attribute with a default of 1 and check every five days to see if the plant is ready to grow. Whether or not a plant grows should take into account its disposition, mood, and overall health. There should not be a maximum size for plants (let's grow some GIANT PLANTS).

Plants do not shrink, but maybe we'd want to include a pruning option in future iterations?

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.