Giter Site home page Giter Site logo

farmgame's Introduction

Farm Game

Objective

Create a PHP application that performs the following game.

A web page must be produced as the interface to play the game. Styling is neither expected nor necessary.

The application must run in a browser.

The game

You have a farm with:

  • 1 farmer: needs to be fed at least once every 15 turns.
  • 2 cows: each cow needs to be fed at least once every 10 turns.
  • 4 bunnies: each bunny needs to be fed at least once every 8 turns.

If any of the animals or the farmer are not fed on time, they die. If the farmer dies, all animals die and the game is over.

The game ends after 50 turns. If the farmer and at least one cow and one bunny are still alive at that point, you win.

How to play

  • There’s a button to start a new game.
  • There's a single button to feed the farmer and the animals. Every time you click on that button, the system randomly chooses whom to feed. Every click on this button is a turn. The maximum number of turns is 50. Don't focus on winning or losing, but on building the game as described.

What we expect

  • Create a new branch for you to use and push your code.
  • Add all commits when possible, so we can see your work process.
  • Highlight your PHP skills.
  • But also add unit tests wherever appropriate.

Good luck, and thanks for your time and interest 👍

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.