goodddnight (a normalish sleep schedule what)
This commit is contained in:
@@ -14,7 +14,7 @@ https://www.scrabble3d.info/t2342f139-Default-rules.html
|
|||||||
If the scope allowed for it, every function would be (reasonably) unit tested.
|
If the scope allowed for it, every function would be (reasonably) unit tested.
|
||||||
|
|
||||||
The solution to locale-ise language in HTML is extremely naive and there are a lot better ways to do it, i did what i could in the time without a full refractor and SSR.
|
The solution to locale-ise language in HTML is extremely naive and there are a lot better ways to do it, i did what i could in the time without a full refractor and SSR.
|
||||||
However it is not at much detriment of readability and maintainability of the code so i diddn't deem it neccesary.
|
However it is not at much detriment of readability and maintainability of the code so i didn't deem it neccesary.
|
||||||
|
|
||||||
The locales are stored in different language files so it is easier for people to contribute and thus more maintanable.
|
The locales are stored in different language files so it is easier for people to contribute and thus more maintanable.
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
|
const Logger = require('./logger.js');
|
||||||
|
const Registrar = require('./game-registrar.js');
|
||||||
|
const Lobbies = require('./lobbies.js');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GAME OBJECT
|
GAME OBJECT
|
||||||
{
|
{
|
||||||
|
// reference UID
|
||||||
locale
|
lobbyuid: uid,
|
||||||
|
locale: en,
|
||||||
|
players: [{uid, activetiles, score}],
|
||||||
|
// index of players
|
||||||
|
turn: int,
|
||||||
|
// TODO: vvv
|
||||||
|
turnstate:
|
||||||
|
tilebag: []
|
||||||
}
|
}
|
||||||
NOTES
|
NOTES
|
||||||
- The locale is the language of the *owner of the lobby*, the dictionary
|
- The locale is the language of the *owner of the lobby*, the dictionary
|
||||||
@@ -12,14 +21,13 @@ NOTES
|
|||||||
*/
|
*/
|
||||||
let ActiveGames = [];
|
let ActiveGames = [];
|
||||||
|
|
||||||
function StartGame()
|
|
||||||
|
function StartGame(lobby)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
StartGame: StartGame,
|
StartGame: StartGame,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
const Logger = require('./logger.js');
|
const Logger = require('./logger.js');
|
||||||
const Registrar = require('./game-registrar.js');
|
const Registrar = require('./game-registrar.js');
|
||||||
const { GetUserByUID } = require('./game-registrar.js');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
LOBBY OBJECT
|
LOBBY OBJECT
|
||||||
@@ -186,7 +185,7 @@ function UserReady(useruid, callback)
|
|||||||
if (Lobbies[lobbyuid].players[player].uid === useruid)
|
if (Lobbies[lobbyuid].players[player].uid === useruid)
|
||||||
Lobbies[lobbyuid].players[player].ready = true;
|
Lobbies[lobbyuid].players[player].ready = true;
|
||||||
|
|
||||||
callback(GetUserByUID(useruid), GetLobbyByUserUID(useruid), 'user-ready');
|
callback(Registrar.GetUserByUID(useruid), GetLobbyByUserUID(useruid), 'user-ready');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user