# Model a virus spread in the population

We have a 2D map of MxN cells. Each cell might have
- empty cell (label 0)
- water block which cannot be shared with anything else (label 1)
- a medical facility (2)
- a human 

The human can be
- healthy (5)
- vaccinated (6)
- infected (10)
- dead (20)

## initialization run

- generate empty map MxN
- with probability p_w put  water cells
- with probability p_m put a medical facility
- with probability p_h put a human
- with probability p_v vaccinate a human
- with probability p_ii infect humans vaccinated or regular

# Task

## implement initialization 

- first place water
- on remaining land put medical facilities
- than place humans
- than infect humans
- return map as numpy array
- call the method mapInit

## implement textual  map visualization

make a function `map2txt` which prints map as a text and use
- w for water
- M for medical facility
- . for empty space
- h for healthy human
- H for vaccinated human
- i for infected human
- x for dead human

## implement graphical  map visualization

Make a function `map2fancy_image` which shows map as an image and use following colors.
The order of rows should be the same as in the text visualization meaning row 0 is at the top of the image,
i.e. do not use `ax.invert_yaxis()`.

- make cells with 1 to 1 aspect ratio
- blue for water
- red bold + for medical facility
- white for empty space
- black circle for healthy human
- green circle  for vaccinated human
- red circle for infected human
- black circle with cross inside for dead human

## implement simple graphical  map visualization

Make a function `map2colormap` which shows map as an image and use following colors.

- treat map as pixelated image with the following colors
- blue for water
- magenta for medical facility
- white for empty space
- grey  for healthy human
- green for vaccinated human
- red for infected human
- black  for dead human

## implement visualisation test

Create or modify them in `test_visualization.py`.
Perform tests on 10x30 grid.

## implements one step of virus spread

Make function `virusMove`. It should take current map and return updated map
according to the following rules

- every infected human can become dead with probability p_d, update map accordingly
- every infected human can become health and immune with probability p_r, update map accordingly
- every infected human can infect neighbors at distance `d` according to probability $p(d) = p_i*exp(- d^2/d_e^2)$
  here d_e is effectivie distance of infection, and p_i is probability scale

return map updated by this rules


# Requirements

- work in this dir
- modify only the  files which were specified for the code
- do not pollute this dir with intermediate versions keep it clean
- before modifying check what is already implemented in the specified files
- for code editing use `patch` unix command but save patches outside of this dir in temporary dir
- do not create backup files in this dir

# Tools

- if you want to use apply_patch just call `patch` in the shell
