🐞 fix: Update functions to work, make new game button stay inline
This commit is contained in:
4
game.php
4
game.php
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user