You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
I started working on this issue by creating a MySQL container. This container loads an init.sql file in order to create the needed DB structure. The documenation is already adapted.
The next step is to use this database in the project itself and to document, how to persist the data (by mounting a volume to the container).
What I found out so far:
$ npm install mysql
Example
var mysql = require('mysql')
var connection = mysql.createConnection({
host : 'localhost',
user : 'dbuser',
password : 's3kreee7',
database : 'my_db'
});
connection.connect()
connection.query('SELECT 1 + 1 AS solution', function (err, rows, fields) {
if (err) throw err
console.log('The solution is: ', rows[0].solution)
})
connection.end()
Some thoughts:
a highscore only makes sense when there is the possibility to persist the usernam. Thus a login-mechanism is needed
There could be different highscores: One for Singleplayer mode, One for Multiplayer mode
Singleplayer Highscore: Increase the AI level after some time. The longer the time, the better the player
Multiplayer Highscore: Number of games, number of wins/looses
What´s a game without a highscore? We need a highscore, preferrably stored in a database.
The text was updated successfully, but these errors were encountered: