diff --git a/TODO b/TODO
index fa4b211..e214bce 100644
--- a/TODO
+++ b/TODO
@@ -14,11 +14,12 @@
→ Update with new locales
→ French (Alexendro)
→ Czech (Mikdore)
+ → Go through code again once finished and pick out locales
☐ Lobbying logic
✔ Create, join, delete and leave lobbies @done(21-04-12 20:51)
✔ Sort out how intents work in game transitioning @done(21-04-12 21:09)
- → Make lobbies publically discoverable on a list
+ ✘ Make lobbies publically discoverable on a list @cancelled(21-05-07 20:11)
☐ Dictionary
→ Find appropriate scrabble dictionary for
@@ -29,18 +30,23 @@
→ Optimise! n-ary tree
☐ Game networking
- ☐ Figure out game reconnection procedure
- ☐ Perhaps players skip a turn if they disconnect on their turn
- ☐ Game should go on until 1 person remains
+ → Figure out game reconnection procedure
+ → Perhaps players skip a turn if they disconnect on their turn
+ → Game should go on until 1 person remains
+ → Game chat
☐ Game logic
✔ Game creation @done(21-04-26 17:38)
- ☐ Multiplayer game logic
- ☐ Process turns
- ☐ Display turns on client
+ → Multiplayer game logic
+ → Process turns
+ → Display turns on client
✘ Singleplayer game logic - OUT OF SCOPE @cancelled(21-04-11 01:04)
✘ AI CPU player @cancelled(21-04-11 01:07)
+☐ Client
+ → Display multiplayer game info
+ → Update dynamically
+
☐ Code
→ Refactor to code portsoc eslint
→ Refactor game client
diff --git a/client/public/scrabble/game.js b/client/public/scrabble/game.js
index d48e7ac..a240350 100644
--- a/client/public/scrabble/game.js
+++ b/client/public/scrabble/game.js
@@ -9,28 +9,35 @@ function computeTurn()
function initGame(boardstate, tileset, myplayer, players)
{
-
// construct piece array
// structure [{letter: '', score: int}]
let drawerStructure = [];
for (const tile of myplayer.activetiles)
{
-
let points = 0;
- // for (const pointband of tileset)
- // {
- // console.log(pointband)
- // }
+ for (const pointband of tileset)
+ {
+ if (tile === '_')
+ {
+ points = '_';
+ break;
+ }
+ if (pointband.letters.includes(tile))
+ {
+ points = pointband.points;
+ break;
+ }
+ }
const piece = {
letter: tile,
score: points
}
drawerStructure.push(piece);
- console.log(tile);
}
-
-
addPiecesToDrawer(drawerStructure);
+
+
+
return true;
}
diff --git a/client/public/scrabble/index.html b/client/public/scrabble/index.html
index c102649..b98bff3 100644
--- a/client/public/scrabble/index.html
+++ b/client/public/scrabble/index.html
@@ -23,7 +23,7 @@