lib/intro-renderer.js
/**
     * Renders an explanatory text about the game.
     */
Renders an explanatory text about the game.
Renders an explanatory text about the game .
renderIntro() {
        const symbols = this.symbols
        const introTexts = this.introTexts
        const decorationSymbols = [symbols.car, symbols.door, symbols.goat]
        const decoration = decorationSymbols.join('  ')
        const headline = [decoration, introTexts.headline, decoration].join('  ')
        const paddedHeadline = TextIo.padToFullWidth(headline, decorationSymbols.length * 2)
        renderHeader(FULL_SHELL_WIDTH_SPACE)
        renderHeader(paddedHeadline)
        renderHeader(FULL_SHELL_WIDTH_SPACE + '\n')
        console.log(wrap(introTexts.paragraph))
        TextIo.nl()
        renderStat(introTexts.authorLabel, this.packageInfo.author)
        renderStat(introTexts.websiteLabel, this.packageInfo.repository.url)
        TextIo.dnl()
    }
renderIntro ( ) { const symbols = this . symbols const introTexts = this . introTexts const decorationSymbols = [ symbols . car , symbols . door , symbols . goat ] const decoration = decorationSymbols . join ( '  ' ) const headline = [ decoration , introTexts . headline , decoration ] . join ( '  ' ) const paddedHeadline = TextIo . padToFullWidth ( headline , decorationSymbols . length * 2 ) renderHeader ( FULL_SHELL_WIDTH_SPACE ) renderHeader ( paddedHeadline ) renderHeader ( FULL_SHELL_WIDTH_SPACE + '\n' ) console . log ( wrap ( introTexts . paragraph ) ) TextIo . nl ( ) renderStat ( introTexts . authorLabel , this . packageInfo . author ) renderStat ( introTexts . websiteLabel , this . packageInfo . repository . url ) TextIo . dnl ( ) }
Renders an explanatory text about the game.
Renders an explanatory text about the game .
// HOTFIX since each Emoji has length = 2, but seems to take only one space in shell output