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

@@ -2,7 +2,7 @@ Original source downloaded [from Vintage Basic](http://www.vintage-basic.net/gam
Conversion to [Microsoft C#](https://docs.microsoft.com/en-us/dotnet/csharp/)
This C# implementation of slots was done using a [C# script](https://github.com/filipw/dotnet-script).
This C# implementation of slots was done using a [C# script](https://github.com/filipw/dotnet-script).
# Required
[.NET Core SDK (i.e., .NET 6.0)](https://dotnet.microsoft.com/en-us/download)
@@ -15,4 +15,4 @@ dotnet tool install -g dotnet-script
# Run
```
dotnet script .\slots.csx
```
```

View File

@@ -49,7 +49,7 @@ public void Play()
}
}
else if(x == y)
{
{
if(y == Slot.BAR)
{
DoubleBar(bet);
@@ -57,7 +57,7 @@ public void Play()
else
{
Double(bet);
}
}
}
else if(x == z)
{

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");

View File

@@ -31,15 +31,15 @@
#
########################################################
from random import choices
from collections import Counter
import sys
from collections import Counter
from random import choices
def initial_message():
print(" "*30 + "Slots")
print(" "*15 + "Creative Computing Morrison, New Jersey")
print("\n"*3)
print(" " * 30 + "Slots")
print(" " * 15 + "Creative Computing Morrison, New Jersey")
print("\n" * 3)
print("You are in the H&M Casino, in front of one of our")
print("one-arm Bandits. Bet from $1 to $100.")
print("To pull the arm, punch the return key after making your bet.")
@@ -65,7 +65,7 @@ def beeping():
# Function to produce a beep sound.
# In the original program is the subroutine at line 1270
for _ in range(5):
sys.stdout.write('\a')
sys.stdout.write("\a")
sys.stdout.flush()
@@ -89,10 +89,10 @@ def adjust_profits(wheel, m, profits):
if fruit == "Bar":
print("\n***Jackpot***")
profits = (((100*m)+m)+profits)
profits = ((100 * m) + m) + profits
else:
print("\n**Top Dollar**")
profits = (((10*m)+m)+profits)
profits = ((10 * m) + m) + profits
print("You Won!")
elif len(s) == 2:
@@ -103,10 +103,10 @@ def adjust_profits(wheel, m, profits):
if fruit == "Bar":
print("\n*Double Bar*")
profits = (((5*m)+m)+profits)
profits = ((5 * m) + m) + profits
else:
print("\nDouble!!")
profits = (((2*m)+m)+profits)
profits = ((2 * m) + m) + profits
print("You Won!")
else:
@@ -135,7 +135,7 @@ while keep_betting:
w = spin_wheels()
profits = adjust_profits(w, m, profits)
print("Your standings are ${}".format(profits))
print(f"Your standings are ${profits}")
answer = input("Again?")
try:

View File

@@ -91,7 +91,7 @@ while true
else
# valid bet, continue
tenBells # ding
# assign a random value from the array to each of the three reels
reel1 = reelArray[rand(5)]
reel2 = reelArray[rand(5)]

View File

@@ -12,7 +12,7 @@
180 IF M>100 THEN 860
190 IF M<1 THEN 880
200 M=INT(M)
210 GOSUB 1270
210 GOSUB 1270
220 PRINT
230 LET X=INT(6*RND(1)+1)
240 LET Y=INT(6*RND(1)+1)
@@ -118,7 +118,7 @@
1240 GOTO 450
1250 PRINT" CHERRY"
1260 GOTO 450
1270 FOR Q4=1 TO 10
1270 FOR Q4=1 TO 10
1280 PRINT CHR$(7);
1290 NEXT Q4
1300 RETURN