ℹ️ For detailed information about the contest, check out devadvent/readme
Weeks before Christmas, Santa's reindeers start practicing their flying in order to be fit for the big night. Unfortunately, one of them (Rudolf) crashed and landed in the forest 🌲
Now, Santa 🎅 needs YOUR help to find him.
The forest is a two-dimensional array of trees (array with array for each row). In one of the fields, there is however Rudolf (🦌) to be found. Here is an example forest (the real forest is to be found in data/forest.js):
const forest = [
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🦌', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
['🌲', '🌲', '🌲', '🌲', '🌲', '🌲'],
]
- Complete the function
findRudolf
in the utils/rescue.js file in order to return the correct column (col
) and row (row
) of where Rudolf is to be found. - The column and rows start with 0
- Return -1 on both values if not found
Check out the contributing guide for details about how to participate.
In short:
- ✨ Create your repository by acceping the assignment using the participation link
- 🧩 Solve the puzzle
- 🐦 Add your Twitter handle to
twitter.js
- 🤖 Test your solution
- 🚀 Upload your changes to the
main
branch
In order to participate, you need to enter the following link and accept the assignment: https://classroom.github.com/a/G0PamWQ
Install the dependencies with
yarn install
or
npm install
Run the code with
yarn dev
or
npm run dev
This puzzle is equipped with automated tests (in the ./tests
folder). In order for your solution to qualify for winning the daily prize, all tests need to pass.
To run these tests, execute one of the following commands in your console:
yarn test
or
npm test