Workshop › Lunar Lander › Step 21 of 31
The player should see the result: a green Landed! or a red Crashed., each saying how to go on.
```js
ctx.textAlign = 'center'
ctx.font = 'bold 22px sans-serif'
if (state === 'landed') {
ctx.fillStyle = '#4ade80'
ctx.fillText('Landed! Space: fly again', canvas.width / 2, 140)
}
if (state === 'crashed') {
ctx.fillStyle = '#f87171'
ctx.fillText('Crashed. Space: try again', canvas.width / 2, 140)
}
```textAlign = 'center' centers the text on the point; canvas.width / 2 is the middle of the screen.In draw, under drawLander(), leave an empty line and write the message lines.
Skills: Drawing on a canvas