Created
March 21, 2017 20:32
-
-
Save BedfordWest/d9282c62756593c0c0d74c925d164bf2 to your computer and use it in GitHub Desktop.
Coding interview exercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################# Werewolf Vampire Town ####################################################### | |
# Objective: You will be given a scenario, as described below. In the language and editor of your choice, write some | |
# functional code (ideal) or pseudocode (if necessary) to implement the requirements described in the scenario. | |
########################################################################################################################### | |
# Scenario: MVP as described by a fictional product owner. For the purposes of this exercise, the interviewer is the PO. | |
There is a fictional town with a number of citizens. | |
Some of these citizens are humans. | |
Some of these citizens are vampires. | |
Some of these citizens are werewolves. | |
Time will progress in the town one day at a time. | |
Every citizen has a 'health' property, which ranges from '0-100'. | |
Vampires have a hunger rating from '0-5'. | |
When vampires reach '5' hunger, they will 'convert' a citizen to a vampire. | |
Werewolves have a hunger rating from '0-5'. | |
When werewolves reach '5' hunger, they will 'eat' a citizen. | |
Hunger ratings increase by '1' each day. | |
######## | |
# Deliverable: what should be produced at the end of the exercise. | |
Given the following starting conditions: | |
'5' Vampires | |
'5' Werewolves | |
'50' Humans | |
What will be the end state of the town after 30 days? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment