mirror of
https://git.astronand.dev/minecartchris/Stock-Game.git
synced 2026-06-28 16:37:23 -04:00
fixed my local git server
This commit is contained in:
@@ -202,7 +202,7 @@ async function buyAll() {
|
||||
const stockPrice = stocks[stockId - 1]['price'];
|
||||
|
||||
// Calculate maximum amount we can buy
|
||||
const maxAmount = Math.floor(balance / stockPrice);
|
||||
const maxAmount = Math.min(Math.floor(balance / stockPrice), 999999999999999999);
|
||||
|
||||
if (maxAmount <= 0) {
|
||||
showError('Insufficient funds to buy any shares of this stock');
|
||||
@@ -248,7 +248,7 @@ async function sellAll() {
|
||||
const gameStateData = await gameStateResponse.json();
|
||||
|
||||
const holdings = gameStateData.holdings;
|
||||
const amountToSell = holdings[stockId - 1]['amount'];
|
||||
const amountToSell = Math.min(holdings[stockId - 1]['amount'], 999999999999999999);
|
||||
|
||||
if (amountToSell <= 0) {
|
||||
showError('You do not own any shares of this stock');
|
||||
|
||||
@@ -18,7 +18,7 @@ body {
|
||||
background: white;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
max-width: 900px;
|
||||
max-width: 1400px;
|
||||
width: 100%;
|
||||
padding: 40px;
|
||||
}
|
||||
@@ -42,6 +42,10 @@ h3 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.section h3 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.screen {
|
||||
display: block;
|
||||
}
|
||||
@@ -122,7 +126,7 @@ h3 {
|
||||
/* Game Content */
|
||||
.game-content {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user