Docs for gamestuff
This commit is contained in:
BIN
client/public/favicon.ico
Normal file
BIN
client/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -116,8 +116,8 @@ function onGameBegin(socket, args)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,23 +7,58 @@ const Helpers = require('./helpers.js');
|
||||
/*
|
||||
GAME OBJECT
|
||||
{
|
||||
// reference UID
|
||||
// Reference UID (of lobby)
|
||||
uid: uid,
|
||||
locale: en,
|
||||
players: [{
|
||||
uid: uid,
|
||||
name: username,
|
||||
activetiles: [tile: {
|
||||
tile: tile,
|
||||
letter: letter,
|
||||
score: int
|
||||
}],
|
||||
score: int
|
||||
}],
|
||||
// index of players whos turn it is
|
||||
// Index of players whos turn it is
|
||||
turn: int,
|
||||
// Array of GAMESTATEs, latest at head of array
|
||||
gamestates: [],
|
||||
tilebag: [],
|
||||
tileset: []
|
||||
}
|
||||
GAMESTATE OBJECT
|
||||
{
|
||||
// UID of the player that played the turn
|
||||
playeruid: uid,
|
||||
turn: int,
|
||||
// Generated after turn is processed
|
||||
outcome: {
|
||||
valid: bool,
|
||||
points: pointsgained,
|
||||
words: [{
|
||||
word: word,
|
||||
points: points,
|
||||
tiles: [{
|
||||
pos: {x: x, y: y},
|
||||
modifier: modifier,
|
||||
letter: letter,
|
||||
score: int
|
||||
}]
|
||||
}],
|
||||
}
|
||||
oldboardtiles: [{
|
||||
pos: {x: x, y: y},
|
||||
modifier: modifier,
|
||||
letter: letter,
|
||||
score: int
|
||||
}]
|
||||
boardtiles: [{
|
||||
pos: {x: x, y: y},
|
||||
modifier: modifier,
|
||||
letter: letter,
|
||||
score: int
|
||||
}]
|
||||
}
|
||||
NOTES
|
||||
- The locale is the language of the *owner of the lobby*, the dictionary
|
||||
will reflect this language choice
|
||||
@@ -31,6 +66,7 @@ NOTES
|
||||
score thing in letter-distributions.js TILEBAG is not to be confused
|
||||
with tileset as those are active game tiles and are modified as turns
|
||||
are played
|
||||
- A GAMESTATE refers to a turn
|
||||
*/
|
||||
let ActiveGames = [];
|
||||
|
||||
@@ -88,7 +124,7 @@ NOTES
|
||||
returning an error or a validation object including the next players
|
||||
turn
|
||||
*/
|
||||
function PlayTurn(game, turn)
|
||||
function PlayTurn(gameuid, playeruid, newstate)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -15,10 +15,11 @@ DISTRIBUTIONS OBJECT
|
||||
...
|
||||
]
|
||||
}
|
||||
NOTES
|
||||
- TODO: JSON-ise it
|
||||
*/
|
||||
let Distributions = [];
|
||||
|
||||
|
||||
Distributions['en'] = {
|
||||
tileset: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
|
||||
blanktiles: 2,
|
||||
|
||||
Reference in New Issue
Block a user