MAINT: Apply pre-commit

Remove byte-order-marker pre-commit check as there would be
many adjustments necessary
This commit is contained in:
Martin Thoma
2022-03-05 09:29:23 +01:00
parent f5e33ae38f
commit e64fb6795c
536 changed files with 6267 additions and 5556 deletions

View File

@@ -5,7 +5,7 @@
static void Main(string[] args)
{
PrintIntro();
string keepPlaying = "Y";
while (keepPlaying == "Y") {
@@ -43,7 +43,7 @@
Console.WriteLine($"TOTAL ROUNDS EXPENDED WERE:{totalAttempts}");
if (amountOfGames < 4) {
Console.WriteLine("THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY...");
Console.WriteLine("THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY...");
} else {
if (totalAttempts > 18) {
PrintReturnToBase();
@@ -111,7 +111,7 @@
return elevation;
}
static void PrintIntro()
static void PrintIntro()
{
Console.WriteLine(new String(' ', 30) + "GUNNER");
Console.WriteLine(new String(' ', 15) + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" + Environment.NewLine + Environment.NewLine + Environment.NewLine);

View File

@@ -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");
@@ -67,7 +67,7 @@ async function main()
s = 0;
print("DISTANCE TO THE TARGET IS " + t + " YARDS.\n");
print("\n");
while (1) {
print("\n");
print("ELEVATION");

View File

@@ -15,7 +15,7 @@ def gunner():
S1 = 0
while True:
T = int(R * (.1 + .8 * random()))
T = int(R * (0.1 + 0.8 * random()))
S = 0
print("\nDISTANCE TO THE TARGET IS", T, "YARDS.")
@@ -39,8 +39,10 @@ def gunner():
X = T - I
E = int(X)
if (abs(E) < 100):
print("*** TARGET DESTROYED *** ", S, "ROUNDS OF AMMUNITION EXPENDED.")
if abs(E) < 100:
print(
"*** TARGET DESTROYED *** ", S, "ROUNDS OF AMMUNITION EXPENDED."
)
S1 += S
if Z == 4:
print("\n\nTOTAL ROUNDS EXPENDED WERE: ", S1)
@@ -52,7 +54,9 @@ def gunner():
return
else:
Z += 1
print("\nTHE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY...")
print(
"\nTHE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY..."
)
break
else:
if E > 100:
@@ -80,6 +84,6 @@ if __name__ == "__main__":
gunner()
Y = input("TRY AGAIN (Y OR N)? ")
if (Y != "Y"):
if Y != "Y":
print("\nOK. RETURN TO BASE CAMP.")
break