🐞 fix: Update functions to work, make new game button stay inline

This commit is contained in:
Keith Solomon
2025-08-15 18:51:11 -05:00
parent 17e925ec8e
commit 428d111cf7
5 changed files with 13 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ session_start();
require_once 'database.php';
// Fetch configuration from the database
$stmt = $db->query('SELECT * FROM configuration');
$stmt = $db->query('SELECT name, value FROM configuration');
$config = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
if (!isset($_SESSION['scores'])) {
@@ -31,7 +31,7 @@ if (!isset($_SESSION['scores'])) {
$action = $_GET['action'] ?? '';
if ($action === 'roll_dice') {
$event = roll_dice($config);
$event = rollDice($config);
$gameState = checkGameState($config);
if ($gameState !== 'ongoing') {