-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstart.pl
executable file
·134 lines (125 loc) · 5.08 KB
/
start.pl
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/usr/bin/perl
use Switch;
print("GREETINGS PROFESSOR X\n");
print("SHALL WE PLAY A GAME?\n");
system("say 'GREETINGS PROFESSOR X'");
system("say 'SHALL WE PLAY A GAME?'");
$currentScore = 0;
#http://www.network-science.de/ascii/
print("::: ::: :::::::::: ::: :::::::: :::::::: :::: :::: :::::::::: \n");
print(":+: :+: :+: :+: :+: :+: :+: :+: +:+:+: :+:+:+ :+: \n");
print("+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+:+ +:+ +:+ \n");
print("+#+ +:+ +#+ +#++:++# +#+ +#+ +#+ +:+ +#+ +:+ +#+ +#++:++# \n");
print("+#+ +#+#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ \n");
print(" #+#+# #+#+# #+# #+# #+# #+# #+# #+# #+# #+# #+# \n");
print(" ### ### ########## ########## ######## ######## ### ### ########## \n");
print("\n");
print(" ::::::::::: :::::::: \n");
print(" :+: :+: :+: \n");
print(" +:+ +:+ +:+ \n");
print(" +#+ +#+ +:+ \n");
print(" +#+ +#+ +#+ \n");
print(" #+# #+# #+# \n");
print(" ### ######## \n");
print("\n");
print(" ::::::::: :::::::: ::: ::: :::::::: ::::::::: \n");
print(" :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: \n");
print(" +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ \n");
print(" +#++:++#: +#+ +:+ +#++:+ +#+ +:+ :#++:++#+ \n");
print(" +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ \n");
print(" #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# \n");
print(" ### ### ######## ### ### ######## ### ### \n");
print("\n");
print(" ::: ::::::::: :::::::: ::: ::::::::: :::::::::: \n");
print(" :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: \n");
print(" +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ \n");
print(" +#++:++#++: +#++:++#: +#+ +#++:++#++: +#+ +:+ +#++:++# \n");
print(" +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ \n");
print(" #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# \n");
print(" ### ### ### ### ######## ### ### ######### ########## \n");
while(1){
print("Current Score = $currentScore\n\n");
print("What would you like to play?\n");
print("0) BinDeciHex\n");
print("1) DarkMathemagic\n");
print("2) One step forward, 3 steps back\n");
print("3) The *other* ESP game\n");
print("4) Global Thermonuclear War\n");
print("q) Quit\n");
print("enter choice> ");
chomp($userInput = <STDIN>);
switch($userInput){
case 0 {
#thanks to the return value limitations, I can't handle a return value > +127, -128
#and I'm too lazy to find another way
$returnScore = system("perl BinDeciHex/perldemo/BinDeciHex.pl");
$returnScore = ($returnScore >> 8);
if($returnScore & 128){
$returnScore = 256 - $returnScore;
$returnScore *= -100;
}
else{
$returnScore *= 100;
}
#print("returnScore = $returnScore\n");
$currentScore += $returnScore;
}
case 1 {
#DarkMathemagic
$returnScore = system("perl DarkMathemagic/perldemo/DarkMathemagic_round2working.pl");
$returnScore = ($returnScore >> 8);
if($returnScore & 128){
$returnScore = 256 - $returnScore;
$returnScore *= -100;
}
else{
$returnScore *= 100;
}
#print("returnScore = $returnScore\n");
$currentScore += $returnScore;
}
case 2 {
$returnScore = system("perl 1step3step/perldemo/1step3step_round3working.pl");
$returnScore = ($returnScore >> 8);
if($returnScore & 128){
$returnScore = 256 - $returnScore;
$returnScore *= -100;
}
else{
$returnScore *= 100;
}
#print("returnScore = $returnScore\n");
$currentScore += $returnScore;
}
case 3 {
$returnScore = system("perl TheOtherESPGame/perldemo/otherESPgame_full.pl");
$returnScore = ($returnScore >> 8);
if($returnScore & 128){
$returnScore = 256 - $returnScore;
$returnScore *= -100;
}
else{
$returnScore *= 100;
}
#print("returnScore = $returnScore\n");
$currentScore += $returnScore;
}
case 4 {
print ("Are you sure you wouldn't prefer a good game of chess?\n");
system("say \"Are you sure you wouldn't prefer a good game of chess?\"");
chomp($userInput = <STDIN>);
print ("Guess what? Nobody cares what you want. Go contemplate your mortality, meatsack. :P\n");
system(" say \"Guess what? Nobody cares what you want. Go contemplate your mortality, meatsack. :P\"");
exit(0x0ddba11);
}
case 'q' {
print "A curious arcade. The only winning move is to play. A LOT!\n";
system(" say \"A curious arcade. The only winning move is to play. A LOT!\"");
exit(0x31337);
}
else{
print "I'm sorry this is confusing to you. Maybe you can ask your mommy to help you with the 'puter?\n";
exit(0xbeefface);
}
}#end switch
}