Workshop › Tower Defense › Step 6 of 42
Now each tile asks the road set: road tiles are grey, the rest stays grass.
```js
ctx.fillStyle = road.has(key(col, row)) ? '#a8a29e' : '#3f6212'
```road.has(key(col, row)) is true for road tiles.condition ? A : B gives A when the condition is true, otherwise B.In draw, change the tiles' fillStyle line as shown.
Skills: Drawing on a canvas
← Fill in the road Walking by distance →