Skip to content

PBI-Edvinas/WREN-JS-Task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wren Kitchens Development Task

Getting Started

The aim of the task is to read the scenario and produce an application that fulfills the requirements listed below.

We have included a base app as a starting point.

To build & run the app you should install NodeJS and then run the following:

npm install
npm start

The app is written using TypeScript. The bundle is generated using Webpack and the UI uses ReactJS

Scenario

The fields are green and Wren are venturing out to become a shepherd.

Your task is to extend the provided code with functionality and logic to create a 'field', add sheep to the field and allow the sheep to breed.

Requirements

The specification of what is required is as follows:

  1. Create a field in which to add the sheep
  2. You must be able to name and add a sheep into the field, each as a male or female
  3. You must be able to brand a sheep at random (paint it green) that is currently living in the field
  4. You must encourage two random sheep to breed and if successful, spawn a new sheep into the field
  5. The 'Getting Started' steps must remain the same

Logic that must be factored in:

  1. The probability of a female sheep giving birth after mating is 50%
  2. Branded sheep must be highlighted in green
  3. Branded sheep are not able to breed

It's up to you how you represent the field, this can be anything from a HTML table to a fully rendered WebGL canvas. Use common sense to define your rules about which sheep can breed with each other, and include them when you return your submission. Good luck!

Aditional logic added

  1. Sheep can be Mature or not to determine if it can breed (does not affect being randomly selected for branding).
  2. If giving birth is success added chance for child to be born either as Male or Female.

About

Wren Kitchen application task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors