fixed my local git server

This commit is contained in:
minecartchris
2026-01-02 02:26:09 -06:00
parent 2aa087ecdd
commit 321277fa56
7 changed files with 638 additions and 40 deletions

View File

@@ -1,10 +1,14 @@
import requests import requests
import time import time
import webbrowser
BASE_URL = 'http://localhost:5000'
BASE_URL = 'https://stock.minecartchris.cc'
log_file = "tradeLog.txt" log_file = "tradeLog.txt"
dayRun = 100 dayRun = 100
webbrowser.get('firefox').open(BASE_URL)
# Create a session object to maintain cookies/session across requests # Create a session object to maintain cookies/session across requests
session = requests.Session() session = requests.Session()

42
leaderboard.json Normal file
View File

@@ -0,0 +1,42 @@
[
{
"name": "test",
"profit": 29242282,
"net_worth": 29243282,
"final_balance": 29243282,
"leaderboardDays": 100,
"timestamp": "2025-12-11 22:53:08"
},
{
"name": "Nvidia",
"profit": 20420,
"net_worth": 21420,
"final_balance": 21420,
"leaderboardDays": 10,
"timestamp": "2025-12-13 15:30:26"
},
{
"name": "test",
"profit": 1680,
"net_worth": 2680,
"final_balance": 2680,
"leaderboardDays": 5,
"timestamp": "2025-12-13 15:25:16"
},
{
"name": "test",
"profit": 0,
"net_worth": 1000,
"final_balance": 1000,
"leaderboardDays": 5,
"timestamp": "2025-12-13 15:24:32"
},
{
"name": "easports",
"profit": 0,
"net_worth": 1000,
"final_balance": 1000,
"leaderboardDays": 5,
"timestamp": "2025-12-13 15:27:17"
}
]

View File

@@ -5,6 +5,7 @@ import os
from datetime import datetime from datetime import datetime
app = Flask(__name__) app = Flask(__name__)
app.secret_key = 'your-secret-key-change-this-in-production'
# Leaderboard file path # Leaderboard file path
LEADERBOARD_FILE = 'leaderboard.json' LEADERBOARD_FILE = 'leaderboard.json'
@@ -24,8 +25,8 @@ COMPANIES = [
{'id': 11, 'name': 'Nvidia', 'key': 'nvidia'} {'id': 11, 'name': 'Nvidia', 'key': 'nvidia'}
] ]
# Game state management # Game state management - now per-client via session
game_state = {} # Removed: game_state = {}
leaderboard = [] leaderboard = []
def load_leaderboard(): def load_leaderboard():
@@ -51,7 +52,7 @@ def save_leaderboard():
def init_game(days): def init_game(days):
"""Initialize a new game session""" """Initialize a new game session"""
# Generate random offsets for initial prices for each company # Generate random offsets for initial prices for each company
price_offsets = {company['key']: random.randint(-100, 100) for company in COMPANIES} price_offsets = {company['key']: random.randint(-1000, 1000) for company in COMPANIES}
# Build state with dynamic company prices and history # Build state with dynamic company prices and history
state = { state = {
@@ -68,7 +69,7 @@ def init_game(days):
key = company['key'] key = company['key']
offset = price_offsets[key] offset = price_offsets[key]
# Ensure initial price is at least $1 # Ensure initial price is at least $1
initial_price = max(1, 100 + offset) initial_price = max(50, 100 + offset)
state[f'{key}StockPrice'] = initial_price state[f'{key}StockPrice'] = initial_price
state[key] = 0 state[key] = 0
state['priceHistory'][key] = [initial_price] state['priceHistory'][key] = [initial_price]
@@ -96,10 +97,10 @@ def get_holdings(state):
def get_game_state_data(): def get_game_state_data():
"""Get current game state data as dictionary""" """Get current game state data as dictionary"""
if 'current' not in game_state: if 'game_state' not in session:
return None return None
state = game_state['current'] state = session['game_state']
stocks = get_stock_list(state) stocks = get_stock_list(state)
holdings = get_holdings(state) holdings = get_holdings(state)
@@ -126,7 +127,7 @@ def start_game():
days = int(data.get('days', 5)) days = int(data.get('days', 5))
state = init_game(days) state = init_game(days)
game_state['current'] = state session['game_state'] = state
return jsonify(get_game_state_data()) return jsonify(get_game_state_data())
@@ -142,10 +143,10 @@ def get_game_state():
@app.route('/api/buy', methods=['POST']) @app.route('/api/buy', methods=['POST'])
def buy_stock(): def buy_stock():
"""Buy stocks""" """Buy stocks"""
if 'current' not in game_state: if 'game_state' not in session:
return jsonify({'error': 'Game not started'}), 400 return jsonify({'error': 'Game not started'}), 400
state = game_state['current'] state = session['game_state']
data = request.json data = request.json
try: try:
@@ -168,6 +169,7 @@ def buy_stock():
state['message'] = f"Successfully bought {amount} shares of {stocks[stock_id - 1]['name']} for ${total_cost}" state['message'] = f"Successfully bought {amount} shares of {stocks[stock_id - 1]['name']} for ${total_cost}"
session['game_state'] = state
return jsonify(get_game_state_data()) return jsonify(get_game_state_data())
except (ValueError, IndexError, KeyError) as e: except (ValueError, IndexError, KeyError) as e:
return jsonify({'error': str(e)}), 400 return jsonify({'error': str(e)}), 400
@@ -175,10 +177,10 @@ def buy_stock():
@app.route('/api/sell', methods=['POST']) @app.route('/api/sell', methods=['POST'])
def sell_stock(): def sell_stock():
"""Sell stocks""" """Sell stocks"""
if 'current' not in game_state: if 'game_state' not in session:
return jsonify({'error': 'Game not started'}), 400 return jsonify({'error': 'Game not started'}), 400
state = game_state['current'] state = session['game_state']
data = request.json data = request.json
try: try:
@@ -205,6 +207,7 @@ def sell_stock():
state['message'] = f"Successfully sold {amount} shares of {stocks[stock_id - 1]['name']} for ${total_payout}" state['message'] = f"Successfully sold {amount} shares of {stocks[stock_id - 1]['name']} for ${total_payout}"
session['game_state'] = state
return jsonify(get_game_state_data()) return jsonify(get_game_state_data())
except (ValueError, IndexError, KeyError) as e: except (ValueError, IndexError, KeyError) as e:
return jsonify({'error': str(e)}), 400 return jsonify({'error': str(e)}), 400
@@ -212,10 +215,10 @@ def sell_stock():
@app.route('/api/next-day', methods=['POST']) @app.route('/api/next-day', methods=['POST'])
def next_day(): def next_day():
"""Progress to next day""" """Progress to next day"""
if 'current' not in game_state: if 'game_state' not in session:
return jsonify({'error': 'Game not started'}), 400 return jsonify({'error': 'Game not started'}), 400
state = game_state['current'] state = session['game_state']
if state['daysleft'] <= 0: if state['daysleft'] <= 0:
return jsonify({'error': 'Game over!', 'game_over': True}), 400 return jsonify({'error': 'Game over!', 'game_over': True}), 400
@@ -244,15 +247,16 @@ def next_day():
else: else:
state['message'] = f"Moved to day {state['day']}" state['message'] = f"Moved to day {state['day']}"
session['game_state'] = state
return jsonify(get_game_state_data()) return jsonify(get_game_state_data())
@app.route('/api/end-game', methods=['GET']) @app.route('/api/end-game', methods=['GET'])
def end_game(): def end_game():
"""Get end game statistics""" """Get end game statistics"""
if 'current' not in game_state: if 'game_state' not in session:
return jsonify({'error': 'Game not started'}), 400 return jsonify({'error': 'Game not started'}), 400
state = game_state['current'] state = session['game_state']
stocks = get_stock_list(state) stocks = get_stock_list(state)
total_net_worth = state['balance'] total_net_worth = state['balance']
@@ -275,13 +279,13 @@ def end_game():
@app.route('/api/save-score', methods=['POST']) @app.route('/api/save-score', methods=['POST'])
def save_score(): def save_score():
"""Save game score to leaderboard""" """Save game score to leaderboard"""
if 'current' not in game_state: if 'game_state' not in session:
return jsonify({'error': 'Game not started'}), 400 return jsonify({'error': 'Game not started'}), 400
data = request.json data = request.json
player_name = data.get('name', 'Anonymous') player_name = data.get('name', 'Anonymous')
state = game_state['current'] state = session['game_state']
stocks = get_stock_list(state) stocks = get_stock_list(state)
total_net_worth = state['balance'] total_net_worth = state['balance']

View File

@@ -202,7 +202,7 @@ async function buyAll() {
const stockPrice = stocks[stockId - 1]['price']; const stockPrice = stocks[stockId - 1]['price'];
// Calculate maximum amount we can buy // Calculate maximum amount we can buy
const maxAmount = Math.floor(balance / stockPrice); const maxAmount = Math.min(Math.floor(balance / stockPrice), 999999999999999999);
if (maxAmount <= 0) { if (maxAmount <= 0) {
showError('Insufficient funds to buy any shares of this stock'); showError('Insufficient funds to buy any shares of this stock');
@@ -248,7 +248,7 @@ async function sellAll() {
const gameStateData = await gameStateResponse.json(); const gameStateData = await gameStateResponse.json();
const holdings = gameStateData.holdings; const holdings = gameStateData.holdings;
const amountToSell = holdings[stockId - 1]['amount']; const amountToSell = Math.min(holdings[stockId - 1]['amount'], 999999999999999999);
if (amountToSell <= 0) { if (amountToSell <= 0) {
showError('You do not own any shares of this stock'); showError('You do not own any shares of this stock');

View File

@@ -18,7 +18,7 @@ body {
background: white; background: white;
border-radius: 15px; border-radius: 15px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
max-width: 900px; max-width: 1400px;
width: 100%; width: 100%;
padding: 40px; padding: 40px;
} }
@@ -42,6 +42,10 @@ h3 {
font-size: 1.1em; font-size: 1.1em;
} }
.section h3 {
text-align: center;
}
.screen { .screen {
display: block; display: block;
} }
@@ -122,7 +126,7 @@ h3 {
/* Game Content */ /* Game Content */
.game-content { .game-content {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
gap: 20px; gap: 20px;
} }

View File

@@ -4,8 +4,9 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stock Trading Game</title> <title>Stock Trading Game</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> <link rel="stylesheet" href="static/style.css"></link>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="./static/game.js"></script>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
@@ -26,15 +27,9 @@
<!-- Game Screen --> <!-- Game Screen -->
<div id="gameScreen" class="screen hidden"> <div id="gameScreen" class="screen hidden">
<div id="message" class="message" style="margin-bottom: 20px;"></div>
<div class="game-content"> <div class="game-content">
<div class="section">
<h3>Stock Prices</h3>
<div id="stocksList" class="stocks-list"></div>
</div>
<div class="section"> <div class="section">
<h3>Your Holdings</h3> <h3>Your Holdings</h3>
<div id="holdingsList" class="holdings-list"></div> <div id="holdingsList" class="holdings-list"></div>
@@ -51,31 +46,35 @@
<input type="number" id="amountInput" min="1" value="1"> <input type="number" id="amountInput" min="1" value="1">
</div> </div>
<div class="button-group"> <div class="button-group">
<button onclick="buyStock()" class="btn-buy">Buy</button>
<button onclick="sellStock()" class="btn-sell">Sell</button> <button onclick="sellStock()" class="btn-sell">Sell</button>
<button onclick="buyStock()" class="btn-buy">Buy</button>
</div> </div>
<div class="button-group"> <div class="button-group" style="margin-top: 10px;">
<button onclick="buyAll()" class="btn-buy-all">Buy All</button>
<button onclick="sellAll()" class="btn-sell-all">Sell All</button> <button onclick="sellAll()" class="btn-sell-all">Sell All</button>
<button onclick="buyAll()" class="btn-buy-all">Buy All</button>
</div> </div>
</div> <div class="info-box" style="margin-top: 10px;">
<div class="section">
<div class="info-box">
<h3>Balance: $<span id="balance">0</span></h3> <h3>Balance: $<span id="balance">0</span></h3>
<h3>Day: <span id="day">1</span>/<span id="totalDays">5</span></h3> <h3>Day: <span id="day">1</span>/<span id="totalDays">5</span></h3>
<h3>Market Index: <span id="index">0</span></h3> <h3>Market Index: <span id="index">0</span></h3>
</div> </div>
<button onclick="nextDay()" class="btn-next-day">Next Day</button> <button onclick="nextDay()" class="btn-next-day">Next Day</button>
<div id="message" class="message" style="margin-top: 10px;"></div>
</div>
<div class="section">
<h3>Stock Prices</h3>
<div id="stocksList" class="stocks-list"></div>
</div> </div>
</div> </div>
<div class="charts-container"> <div class="charts-container" style="margin-top: 10px;">
<h3 style="grid-column: 1/-1; margin-bottom: 10px;">Stock Price Trends</h3> <div class="chart-item" style="grid-column: 1/-1; padding-top: 10px;">
<div class="chart-item" style="grid-column: 1/-1;"> <h3 style="margin-bottom: 5px; text-align: center;">Stock Price Trends</h3>
<canvas id="priceChart"></canvas> <canvas id="priceChart"></canvas>
</div> </div>
</div> </div>
</div> </div>
<!-- End Game Screen --> <!-- End Game Screen -->
@@ -117,6 +116,5 @@
</div> </div>
</div> </div>
<script src="{{ url_for('static', filename='game.js') }}"></script>
</body> </body>
</html> </html>

546
tradeLog.txt Normal file
View File

@@ -0,0 +1,546 @@
Game started!
Balance: $1000
Cheapest stock: Kwik trip at $50
Bought 20 shares of Kwik trip
--- Day 2 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 20 shares
Balance: $2240
Bought 2240 shares of Microsoft
--- Day 3 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 4 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 2240 shares
Balance: $2240
Bought 2240 shares of Apple computers
--- Day 5 ---
Cheapest stock now: Car company at $1
Different stock is cheaper! Switching...
Sold 2240 shares
Balance: $224000
Bought 224000 shares of Car company
--- Day 6 ---
Cheapest stock now: Netflix at $1
Different stock is cheaper! Switching...
Sold 224000 shares
Balance: $5152000
Bought 5152000 shares of Netflix
--- Day 7 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 5152000 shares
Balance: $288512000
Bought 288512000 shares of Microsoft
--- Day 8 ---
Cheapest stock now: Amazon at $1
Different stock is cheaper! Switching...
Sold 288512000 shares
Balance: $26831616000
Bought 26831616000 shares of Amazon
--- Day 9 ---
Cheapest stock now: Amazon at $1
Same stock is still cheapest, holding position.
--- Day 10 ---
Cheapest stock now: Amazon at $1
Same stock is still cheapest, holding position.
--- Day 11 ---
Cheapest stock now: Netflix at $1
Different stock is cheaper! Switching...
Sold 26831616000 shares
Balance: $2441677056000
Bought 2441677056000 shares of Netflix
--- Day 12 ---
Cheapest stock now: Netflix at $1
Same stock is still cheapest, holding position.
--- Day 13 ---
Cheapest stock now: Google at $1
Different stock is cheaper! Switching...
Sold 2441677056000 shares
Balance: $2441677056000
Bought 2441677056000 shares of Google
--- Day 14 ---
Cheapest stock now: Netflix at $1
Different stock is cheaper! Switching...
Sold 2441677056000 shares
Balance: $107433790464000
Bought 107433790464000 shares of Netflix
--- Day 15 ---
Cheapest stock now: Netflix at $1
Same stock is still cheapest, holding position.
--- Day 16 ---
Cheapest stock now: Netflix at $1
Same stock is still cheapest, holding position.
--- Day 17 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 107433790464000 shares
Balance: $107433790464000
Bought 107433790464000 shares of Microsoft
--- Day 18 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 19 ---
Cheapest stock now: Apple computers at $30
Different stock is cheaper! Switching...
Sold 107433790464000 shares
Balance: $4082484037632000
Bought 136082801254400 shares of Apple computers
--- Day 20 ---
Cheapest stock now: Amazon at $31
Different stock is cheaper! Switching...
Sold 136082801254400 shares
Balance: $6259808857702400
Bought 201929317990400 shares of Amazon
--- Day 21 ---
Cheapest stock now: Amazon at $22
Same stock is still cheapest, holding position.
--- Day 22 ---
Cheapest stock now: Microsoft at $24
Different stock is cheaper! Switching...
Sold 201929317990400 shares
Balance: $18577497255116800
Bought 774062385629866 shares of Microsoft
--- Day 23 ---
Cheapest stock now: Microsoft at $66
Same stock is still cheapest, holding position.
--- Day 24 ---
Cheapest stock now: Microsoft at $54
Same stock is still cheapest, holding position.
--- Day 25 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 26 ---
Cheapest stock now: Apple computers at $44
Different stock is cheaper! Switching...
Sold 774062385629866 shares
Balance: $64247178007278894
Bought 1460163136529065 shares of Apple computers
--- Day 27 ---
Cheapest stock now: Apple computers at $1
Same stock is still cheapest, holding position.
--- Day 28 ---
Cheapest stock now: Amazon at $1
Different stock is cheaper! Switching...
Sold 1460163136529065 shares
Balance: $73008156826453284
Bought 73008156826453284 shares of Amazon
--- Day 29 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 73008156826453284 shares
Balance: $73008156826453284
Bought 73008156826453284 shares of Apple computers
--- Day 30 ---
Cheapest stock now: Apple computers at $1
Same stock is still cheapest, holding position.
--- Day 31 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 73008156826453284 shares
Balance: $4234473095934290472
Bought 4234473095934290472 shares of Microsoft
--- Day 32 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 33 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 34 ---
Cheapest stock now: Microsoft at $19
Same stock is still cheapest, holding position.
--- Day 35 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 36 ---
Cheapest stock now: Car company at $1
Different stock is cheaper! Switching...
Sold 4234473095934290472 shares
Balance: $203254708604845942656
Bought 203254708604845942656 shares of Car company
--- Day 37 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 38 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 39 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 203254708604845942656 shares
Balance: $203254708604845942656
Bought 203254708604845942656 shares of Microsoft
--- Day 40 ---
Cheapest stock now: Microsoft at $20
Same stock is still cheapest, holding position.
--- Day 41 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 42 ---
Cheapest stock now: Microsoft at $69
Same stock is still cheapest, holding position.
--- Day 43 ---
Cheapest stock now: Google at $20
Different stock is cheaper! Switching...
Sold 203254708604845942656 shares
Balance: $4268348880701764795776
Bought 213417444035088239788 shares of Google
--- Day 44 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 213417444035088239788 shares
Balance: $11311124533859676708780
Bought 11311124533859676708780 shares of Microsoft
--- Day 45 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 46 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 47 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 48 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 49 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 50 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 51 ---
Cheapest stock now: Car company at $30
Different stock is cheaper! Switching...
Sold 11311124533859676708780 shares
Balance: $1119801328852107994169220
Bought 37326710961736933138974 shares of Car company
--- Day 52 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 53 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 37326710961736933138974 shares
Balance: $37326710961736933138974
Bought 37326710961736933138974 shares of Microsoft
--- Day 54 ---
Cheapest stock now: Car company at $1
Different stock is cheaper! Switching...
Sold 37326710961736933138974 shares
Balance: $447920531540843197667688
Bought 447920531540843197667688 shares of Car company
--- Day 55 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 447920531540843197667688 shares
Balance: $447920531540843197667688
Bought 447920531540843197667688 shares of Apple computers
--- Day 56 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 447920531540843197667688 shares
Balance: $24635629234746375871722840
Bought 24635629234746375871722840 shares of Microsoft
--- Day 57 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 58 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 59 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 60 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 24635629234746375871722840 shares
Balance: $24635629234746375871722840
Bought 24635629234746375871722840 shares of Apple computers
--- Day 61 ---
Cheapest stock now: Apple computers at $1
Same stock is still cheapest, holding position.
--- Day 62 ---
Cheapest stock now: Apple computers at $1
Same stock is still cheapest, holding position.
--- Day 63 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 24635629234746375871722840 shares
Balance: $270991921582210134588951240
Bought 270991921582210134588951240 shares of Microsoft
--- Day 64 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 65 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 270991921582210134588951240 shares
Balance: $15446539530185977671570220680
Bought 15446539530185977671570220680 shares of Apple computers
--- Day 66 ---
Cheapest stock now: Google at $1
Different stock is cheaper! Switching...
Sold 15446539530185977671570220680 shares
Balance: $880452753220600727279502578760
Bought 880452753220600727279502578760 shares of Google
--- Day 67 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 880452753220600727279502578760 shares
Balance: $880452753220600727279502578760
Bought 880452753220600727279502578760 shares of Apple computers
--- Day 68 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 880452753220600727279502578760 shares
Balance: $11445885791867809454633533523880
Bought 11445885791867809454633533523880 shares of Microsoft
--- Day 69 ---
Cheapest stock now: Apple computers at $1
Different stock is cheaper! Switching...
Sold 11445885791867809454633533523880 shares
Balance: $824103777014482280733614413719360
Bought 824103777014482280733614413719360 shares of Apple computers
--- Day 70 ---
Cheapest stock now: Apple computers at $1
Same stock is still cheapest, holding position.
--- Day 71 ---
Cheapest stock now: Car company at $1
Different stock is cheaper! Switching...
Sold 824103777014482280733614413719360 shares
Balance: $33788254857593773510078190962493760
Bought 33788254857593773510078190962493760 shares of Car company
--- Day 72 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 73 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 33788254857593773510078190962493760 shares
Balance: $33788254857593773510078190962493760
Bought 33788254857593773510078190962493760 shares of Microsoft
--- Day 74 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 75 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 76 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 77 ---
Cheapest stock now: Microsoft at $11
Same stock is still cheapest, holding position.
--- Day 78 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 79 ---
Cheapest stock now: Car company at $18
Different stock is cheaper! Switching...
Sold 33788254857593773510078190962493760 shares
Balance: $2534119114319533013255864322187032000
Bought 140784395239974056291992462343724000 shares of Car company
--- Day 80 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 81 ---
Cheapest stock now: Car company at $37
Same stock is still cheapest, holding position.
--- Day 82 ---
Cheapest stock now: Car company at $42
Same stock is still cheapest, holding position.
--- Day 83 ---
Cheapest stock now: Microsoft at $66
Different stock is cheaper! Switching...
Sold 140784395239974056291992462343724000 shares
Balance: $19569030938356393824586952265777636000
Bought 296500468762975664008893216148146000 shares of Microsoft
--- Day 84 ---
Cheapest stock now: Microsoft at $1
Same stock is still cheapest, holding position.
--- Day 85 ---
Cheapest stock now: Microsoft at $64
Same stock is still cheapest, holding position.
--- Day 86 ---
Cheapest stock now: Car company at $109
Different stock is cheaper! Switching...
Sold 296500468762975664008893216148146000 shares
Balance: $45068071251972300929351768854518192000
Bought 413468543596076155315153842702001761 shares of Car company
--- Day 87 ---
Cheapest stock now: Car company at $27
Same stock is still cheapest, holding position.
--- Day 88 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 89 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 90 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 91 ---
Cheapest stock now: Microsoft at $78
Different stock is cheaper! Switching...
Sold 413468543596076155315153842702001761 shares
Balance: $40933385816011539376200230427498174390
Bought 524786997641173581746156800352540697 shares of Microsoft
--- Day 92 ---
Cheapest stock now: Microsoft at $46
Same stock is still cheapest, holding position.
--- Day 93 ---
Cheapest stock now: Car company at $13
Different stock is cheaper! Switching...
Sold 524786997641173581746156800352540697 shares
Balance: $74519753665046648607954265650060778998
Bought 5732288743465126815996481973081598384 shares of Car company
--- Day 94 ---
Cheapest stock now: Microsoft at $71
Different stock is cheaper! Switching...
Sold 5732288743465126815996481973081598384 shares
Balance: $429921655759884511199736147981119878806
Bought 6055234588167387481686424619452392659 shares of Microsoft
--- Day 95 ---
Cheapest stock now: Car company at $37
Different stock is cheaper! Switching...
Sold 6055234588167387481686424619452392659 shares
Balance: $538915878346897485870091791131262946668
Bought 14565294009375607726218697057601701261 shares of Car company
--- Day 96 ---
Cheapest stock now: Car company at $1
Same stock is still cheapest, holding position.
--- Day 97 ---
Cheapest stock now: Microsoft at $1
Different stock is cheaper! Switching...
Sold 14565294009375607726218697057601701261 shares
Balance: $14565294009375607726218697057601701272
Bought 14565294009375607726218697057601701272 shares of Microsoft
--- Day 98 ---
Cheapest stock now: Car company at $1
Different stock is cheaper! Switching...
Sold 14565294009375607726218697057601701272 shares
Balance: $903048228581287679025559217571305478864
Bought 903048228581287679025559217571305478864 shares of Car company
--- Day 99 ---
Cheapest stock now: Car company at $33
Same stock is still cheapest, holding position.
--- Day 100 ---
Cheapest stock now: Car company at $37
Same stock is still cheapest, holding position.
--- Day 101 ---
Cheapest stock now: Car company at $51
Same stock is still cheapest, holding position.
=== GAME OVER - SELLING ALL ===
Sold 903048228581287679025559217571305478864 shares of Car company
=== FINAL RESULTS ===
Starting balance: $1000
Ending balance: $46055459657645671630303520096136579422064
Profit: $46055459657645671630303520096136579421064
Score saved successfully!