|
1 | | -System.setProperty("java.awt.headless", "false") |
2 | | -getClass().classLoader.addURL(new File("./lib/mochadoom.jar").toURL()) |
3 | | -final String[] wad = ["-iwad", "$projectDir/doom1.wad"] |
4 | | -mochadoom.Engine.main(wad) |
| 1 | +#!/usr/bin/env nextflow |
| 2 | + |
| 3 | +process printLogo { |
| 4 | + output: |
| 5 | + stdout |
| 6 | + |
| 7 | + script: |
| 8 | + ''' |
| 9 | + echo """ |
| 10 | +▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ |
| 11 | +▒▒████████████████████▒▒██████████████████▒▒██████████████████▒▒██████▒▒▒▒▒▒████████▒▒ |
| 12 | +▒▒▒▒██████████████████▒▒██████████████████▒▒██████████████████▒▒██████▒▒▒▒▒▒██████▒▒▒▒ |
| 13 | + ▒▒██████████████████▒▒██████████████████▒▒██████████████████▒▒████████▒▒████████▒▒ |
| 14 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 15 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 16 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 17 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 18 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 19 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 20 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 21 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 22 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████████████████▒▒ |
| 23 | + ▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒▒▒▒▒██████▒▒██████▒▒██▒▒██████▒▒ |
| 24 | + ▒▒██████▒▒▒▒████████▒▒████████▒▒▒▒██████▒▒██████▒▒▒▒████████▒▒██████▒▒▒▒▒▒██████▒▒ |
| 25 | + ▒▒██████▒▒████████▒▒▒▒▒▒████████████████▒▒████████████████▒▒▒▒▒▒████▒▒ ▒▒██████▒▒ |
| 26 | + ▒▒██████████████▒▒▒▒ ▒▒▒▒████████████▒▒▒▒▒▒████████████▒▒▒▒ ▒▒████▒▒ ▒▒██████▒▒ |
| 27 | + ▒▒████████████▒▒▒▒ ▒▒▒▒████████▒▒▒▒ ▒▒▒▒████████▒▒▒▒ ▒▒▒▒██▒▒ ▒▒██████▒▒ |
| 28 | + ▒▒██████████▒▒▒▒ ▒▒▒▒████▒▒▒▒ ▒▒▒▒████▒▒▒▒ ▒▒▒▒▒▒ ▒▒██████▒▒ |
| 29 | + ▒▒████████▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒████▒▒ |
| 30 | + ▒▒██████▒▒▒▒ ▒▒████▒▒ |
| 31 | + ▒▒████▒▒▒▒ ▒▒▒▒██▒▒ |
| 32 | + ▒▒██▒▒▒▒ ▒▒██▒▒ |
| 33 | + ▒▒▒▒▒▒ ▒▒▒▒▒▒ |
| 34 | +"""''' |
| 35 | +} |
| 36 | + |
| 37 | +process printQuote { |
| 38 | + input: |
| 39 | + val doomLogo |
| 40 | + |
| 41 | + output: |
| 42 | + val true |
| 43 | + |
| 44 | + exec: |
| 45 | + def quotes = [ |
| 46 | + "Get ready to rip and tear!", |
| 47 | + "They are rage, brutal, without mercy. But you... you will be worse.", |
| 48 | + "No rest for the living.", |
| 49 | + "Knee-deep in the dead.", |
| 50 | + "The demons are everywhere. Time to fight back.", |
| 51 | + "Hell on Earth awaits.", |
| 52 | + "Loading up for battle...", |
| 53 | + "Remember: shoot first, ask questions later.", |
| 54 | + "Warning: May contain demons." |
| 55 | + ] |
| 56 | + def randomQuote = quotes[new Random().nextInt(quotes.size())] |
| 57 | + def logoWidth = 86 |
| 58 | + def quoteWidth = randomQuote.length() + 3 |
| 59 | + def border = "═" * quoteWidth |
| 60 | + def leftPadding = " " * ((logoWidth - quoteWidth) / 2).intValue() |
| 61 | + print(doomLogo) |
| 62 | + println "${leftPadding}${border}\n${leftPadding} ${randomQuote}\n${leftPadding}${border}" |
| 63 | + Thread.sleep(1000) // Pause for dramatic effect |
| 64 | +} |
| 65 | + |
| 66 | +process playDoom { |
| 67 | + input: |
| 68 | + val logoDone |
| 69 | + |
| 70 | + output: |
| 71 | + val true |
| 72 | + |
| 73 | + script: |
| 74 | + """ |
| 75 | + java -jar $projectDir/lib/mochadoom.jar -iwad $projectDir/doom1.wad |
| 76 | + """ |
| 77 | +} |
| 78 | + |
| 79 | +process insultUser { |
| 80 | + input: |
| 81 | + val done |
| 82 | + |
| 83 | + exec: |
| 84 | + def quotes = [ |
| 85 | + "That's it? I've seen better performance from a failed process.", |
| 86 | + "All done? That execution was about as clean as your error logs.", |
| 87 | + "Finished already? Even a corrupted FASTQ file is less of a mess than that.", |
| 88 | + "Had enough? Your gameplay needs serious debugging. Maybe try with -resume.", |
| 89 | + "Done so soon? I've seen conda environments resolve faster than your reflexes.", |
| 90 | + "Quitting already? Error: Player performance below minimum quality threshold.", |
| 91 | + "Too much for ya? Maybe stick to the easier levels next time.", |
| 92 | + "Giving up? Even the zombies put up more of a fight than you did.", |
| 93 | + "That's all? Maybe turn the difficulty down... oh wait, you already did.", |
| 94 | + "Game over? The demons weren't scared. They were laughing.", |
| 95 | + "Already done? Did you even try, or were you just sightseeing?", |
| 96 | + "Finished? That was painful to watch. The demons send their regards.", |
| 97 | + "Had enough? Next time, try using the weapons instead of running into walls." |
| 98 | + ] |
| 99 | + def randomQuote = quotes[new Random().nextInt(quotes.size())] |
| 100 | + def logoWidth = 86 |
| 101 | + def quoteWidth = randomQuote.length() + 3 |
| 102 | + def border = "~" * quoteWidth |
| 103 | + def leftPadding = " " * ((logoWidth - quoteWidth) / 2).intValue() |
| 104 | + println "\n${leftPadding}${border}\n${leftPadding} ${randomQuote}\n${leftPadding}${border}" |
| 105 | + Thread.sleep(1000) // Pause for dramatic effect |
| 106 | +} |
| 107 | + |
| 108 | +workflow { |
| 109 | + printLogo | printQuote | playDoom | insultUser |
| 110 | +} |
0 commit comments