Merge remote-tracking branch 'upstream/redacted' into redacted

This commit is contained in:
Elijah Steres 2020-12-30 03:50:40 -05:00
commit e22b271248
8 changed files with 39 additions and 5 deletions

View File

@ -44,6 +44,8 @@ def update_loop():
state["update_text"] = "Play blall!" #they also need a timestamp
state["delay"] -= 1
state["display_top_of_inning"] = state["top_of_inning"]
if state["delay"] <= 0:
if this_game.top_of_inning != state["top_of_inning"]:
state["update_pause"] = 2
@ -51,6 +53,7 @@ def update_loop():
state["batter"] = "-"
if not state["top_of_inning"]:
state["display_inning"] -= 1
state["display_top_of_inning"] = False
if state["update_pause"] == 1:
state["update_emoji"] = "🍿"
@ -100,4 +103,4 @@ def update_loop():
state["update_pause"] -= 1
socketio.emit("states_update", states_to_send)
time.sleep(1)
time.sleep(3)

View File

@ -0,0 +1,8 @@
SELECT name,
plate_appearances - (walks_taken + sacrifices) as atbats,
ROUND(hits*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as average,
ROUND(total_bases*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as slg,
ROUND((walks_taken + hits)*1.0/plate_appearances*1.0,3) as obp,
ROUND((walks_taken + hits)*1.0/plate_appearances*1.0,3) + ROUND(total_bases*1.0 / (plate_appearances - (walks_taken + sacrifices)*1.0),3) as ops
FROM stats WHERE plate_appearances > 50
ORDER BY ops DESC;

View File

@ -0,0 +1,9 @@
SELECT name,
outs_pitched,
ROUND(runs_allowed*27.0/(outs_pitched*1.0),3) as era,
ROUND((walks_allowed+hits_allowed)*3.0/(outs_pitched*1.0),3) as whip,
ROUND(walks_allowed*27.0/(outs_pitched*1.0),3) as bbper9,
ROUND(strikeouts_given*27.0/(outs_pitched*1.0),3) as kper9,
ROUND(strikeouts_given*1.0/walks_allowed*1.0,3) as kperbb
FROM stats WHERE outs_pitched > 150
ORDER BY bbper9 ASC;

BIN
static/discord.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -1,4 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Alegreya&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Goldman:wght@700&display=swap');
body {
background-image: url("prism.png");
}
@ -21,12 +22,23 @@ body {
grid-row: 1;
}
.link{
position: relative;
top: 10px;
}
.h1 {
margin: auto;
width: 45%;
color: white;
font-family: 'Alegreya', serif;
}
.page_header {
color: white;
font-family: 'Goldman', cursive;
}
.emptyslot {
border: 2px dashed white;
border-radius: 15px;

View File

@ -54,7 +54,7 @@ $(document).ready(function (){
const updateGame = (gamediv, gamestate) => {
gamediv.id = "updateTarget";
$('#updateTarget .inning').html("Inning: " + (gamestate.top_of_inning ? "🔼" : "🔽") + " " + gamestate.display_inning + "/" + gamestate.max_innings);
$('#updateTarget .inning').html("Inning: " + (gamestate.display_top_of_inning ? "🔼" : "🔽") + " " + gamestate.display_inning + "/" + gamestate.max_innings);
$('#updateTarget .weather').html(gamestate.weather_emoji + " " + gamestate.weather_text);
$('#updateTarget .away_name').html(gamestate.away_name);

View File

@ -11,8 +11,9 @@
<body>
<section class="container" id="container">
<div></div>
<div class="emptyslot" id="title">
<h1>game page ahoy</h1>
<div id="title">
<h2 class="page_header">THE SIMMADOME</h2>
<h2 class="page_header">Join SIBR on <a href="https://discord.gg/UhAajY2NCW" class="link"><img src="static/discord.png" height="30"></a> to start your own games!</h2>
</div>
<div></div>
<div class="emptyslot"></div>

View File

@ -57,6 +57,7 @@
<Content Include="games_config.json" />
<Content Include="ids" />
<Content Include="matteo.db" />
<Content Include="static\discord.png" />
<Content Include="static\games_page.css" />
<Content Include="static\loader.js" />
<Content Include="static\prism.png" />