Displaying information about the game session

For the fifth and very last part of our spec, we need to display information about the game and provide a way to navigate back to the previous articles. We'll define the following functions:

function objective(game) 
    Go from <i>$(game.articles[1].title)</i>  
    to <i>$(game.articles[end].title)</i> 
    Progress: $(size(game.history, 1) - 1)  
    out of maximum $(size(game.articles, 1) - 1) links  
    in $(game.steps_taken) steps 
    <a href="/$(game.id)/solution">Solution?</a> |  
    <a href="/">New game</a> 

The objective function informs the player about the start and end articles and about the current progress. It also provides a small menu so that you can view the solution ...

Get Julia 1.0 Programming Complete Reference Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.