Beta

Road To Nowhere - Reverse engineer this picture

Description:

Road To Nowhere

Your goal is to reverse engineer the picture below. You will have to create a general solution that will return the data of the following image for any width and height given.

A code golf version is available here.

Rules

  • You must implement the function d.
  • Which takes 2 numbers, width and height.
  • The returned format should be an array of rows, where the rows are arrays of colors, where the colors are arrays, with 3 truthy or falsey values, representing red, green and blue. e.g.array[height][width][3]

Note: A helper function draw(width, height, array) is available to you, which takes an array in the expected return format of d.

Reference images

Puzzles

More By Author:

Check out these other kata created by morganbarrett

Stats:

CreatedJun 19, 2021
PublishedJun 19, 2021
Warriors Trained26
Total Skips0
Total Code Submissions100
Total Times Completed4
JavaScript Completions4
Total Stars3
% of votes with a positive feedback rating0% of 1
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes0
Total "Not Satisfied" Votes1
Total Rank Assessments1
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
5 kyu
Ad
Contributors
  • morganbarrett Avatar
Ad