~dricottone/riddler-230106

ref: 7ae2c096d5b882fd5c3d189a8ca9e7b2b9d6da06 riddler-230106/classic/__main__.py -rw-r--r-- 1.4 KiB
7ae2c096Dominic Ricottone Fiddling with a README 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python3

import sys

import classic.main as main
import classic.test as test

if len(sys.argv) > 1 and sys.argv[1] == "test":
    test.main()
elif len(sys.argv) > 1 and sys.argv[1] == "help":
    print(
        "The astronomers of Planet Xiddler are back in action! Unfortunately,\n"
        "this time they have used their telescopes to spot an armada of \n"
        "hostile alien warships on a direct course for Xiddler. The armada\n"
        "will be arriving in exactly 100 days. (Recall that, like Earth,\n"
        "there are 24 hours in a Xiddler day.)\n\n"
        "Fortunately, Xiddler’s engineers have just completed construction of\n"
        "the planet’s first assembler, which is capable of producing any\n"
        "object. An assembler can be used to build a space fighter to defend\n"
        "the planet, which takes one hour to produce. An assembler can also\n"
        "be used to build another assembler (which, in turn, can build other\n"
        "space fighters or assemblers). However, building an assembler is\n"
        "more time-consuming, requiring six whole days. Also, you cannot use\n"
        "multiple assemblers to build one space fighter or assembler in a\n"
        "shorter period of time.\n\n"
        "What is the greatest number of space fighters the Xiddlerian fleet\n"
        "can have when the alien armada arrives?"
    )
elif len(sys.argv) > 1 and sys.argv[1] == "dump":
    main.dump()
else:
    main.main()