Look at the test function first! See how it returns this for a level:
[ [ 'w', 'w', 'w', 'w', 'w', 'w' ],
[ 'w', '-', '-', 'p', '-', 'w' ],
[ 'w', '-', 'r', '-', '-', 'w' ],
[ 'w', 'w', '-', 'w', 'g', 'w' ],
[ 'w', '-', 'b', 'v', '-', 'w' ],
[ 'w', '-', '-', 'c', 'B', 'w' ],
[ 'w', 'C', 'R', 'V', 'G', 'w' ],
[ 'w', 'w', 'w', 'w', 'w', 'w' ] ],
This is a 2d list of all the cell contents in the level, as such:
w: wall
p: player
r,g,b,v,c: block of the given color (red, green, blue, violet, cyan)
R,G,B,V,C: target of the given color (red, green, blue, violet, cyan)
-: empty cell
This 2d list matches level3-8x6.png