mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-27 23:36:18 -08:00
MAINT: Apply pre-commit
Remove byte-order-marker pre-commit check as there would be many adjustments necessary
This commit is contained in:
@@ -17,8 +17,7 @@ http://www.vintage-basic.net/games.html
|
||||
|
||||
### Bugs
|
||||
|
||||
- In the original version, the data pointer doesn't reset after a race is completed. This causes subsequent races to
|
||||
- In the original version, the data pointer doesn't reset after a race is completed. This causes subsequent races to
|
||||
error at some future point at line 540,
|
||||
|
||||
540 READ Q
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Slalom
|
||||
{
|
||||
Success = true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
Console.WriteLine("The bounds are 1-3");
|
||||
}
|
||||
@@ -157,7 +157,7 @@ namespace Slalom
|
||||
|
||||
return Option;
|
||||
}
|
||||
|
||||
|
||||
private string PromptForCommand()
|
||||
{
|
||||
bool Success = false;
|
||||
@@ -204,7 +204,7 @@ namespace Slalom
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rand.NextDouble() < 0.5)
|
||||
if (rand.NextDouble() < 0.5)
|
||||
{
|
||||
Console.WriteLine("snagged a flag!");
|
||||
}
|
||||
@@ -217,11 +217,11 @@ namespace Slalom
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (MPH > (MaxGateSpeed - 1))
|
||||
{
|
||||
Console.WriteLine("Close one!");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ namespace Slalom
|
||||
double MaxGateSpeed = 0; // Q
|
||||
double PreviousMPH = 0;
|
||||
double Medals = 0;
|
||||
|
||||
|
||||
Console.WriteLine("The starter counts down...5...4...3...2...1...GO!");
|
||||
|
||||
MPH = rand.NextDouble() * (18-9)+9;
|
||||
@@ -253,7 +253,7 @@ namespace Slalom
|
||||
PreviousMPH = MPH;
|
||||
|
||||
Option = PromptForOption();
|
||||
while (Option == 0)
|
||||
while (Option == 0)
|
||||
{
|
||||
Console.WriteLine("You've taken {0:N2} seconds.", Time);
|
||||
Option = PromptForOption();
|
||||
@@ -430,4 +430,4 @@ namespace Slalom
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,4 +370,4 @@ public class Slalom {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ function input()
|
||||
{
|
||||
var input_element;
|
||||
var input_str;
|
||||
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
input_element = document.createElement("INPUT");
|
||||
|
||||
|
||||
print("? ");
|
||||
input_element.setAttribute("type", "text");
|
||||
input_element.setAttribute("length", "50");
|
||||
@@ -88,7 +88,7 @@ async function main()
|
||||
var gold = 0;
|
||||
var silver = 0;
|
||||
var bronze = 0;
|
||||
|
||||
|
||||
print(tab(33) + "SLALOM\n");
|
||||
print(tab(15) + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n");
|
||||
print("\n");
|
||||
|
||||
Reference in New Issue
Block a user