-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
37 lines (33 loc) · 937 Bytes
/
Copy pathconfig.php
File metadata and controls
37 lines (33 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
session_start();
$DB_HOST = 'localhost';
$DB_USER = 'your_infinityfree_user'; // change this
$DB_PASS = 'your_infinityfree_pass'; // change this
$DB_NAME = 'your_infinityfree_db'; // change this
$conn = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME);
if ($conn->connect_error) die("DB Error");
$BOT_ELO = [
'pupil' => 800,
'tactician' => 1100,
'solver' => 1300,
'oracle' => 1500,
'singularity' => 1600,
'infinity' => 1800,
'multiplayer' => 1550 // hoax uses oracle/singularity elo
];
$BOT_VALUES = [ // for leaderboard weighting
'pupil' => 0.2, // 2/10
'tactician' => 0.5, // 5/10
'solver' => 0.65, // 6.5/10
'oracle' => 0.8, // 8/10
'singularity' => 0.9, // 9/10
'infinity' => 1.0, // 10/10
'multiplayer' => 0.85 // counts as 8.5/10
];
function require_login() {
if (!isset($_SESSION['user_id'])) {
header("Location: index.php");
exit;
}
}
?>