I did this.:
Your logic says : if the array contains AValue then set every array value to 5. You need to compare curx,cury = AValue in a loop.
Develop games in your browser. Powerful, performant & highly capable.
What should I do without you Plinkie. Thanks. :-)