csc480-18s / red-team Goto Github PK
View Code? Open in Web Editor NEWRed Team Repository
License: MIT License
Red Team Repository
License: MIT License
Eslint is saying that this file has 113 errors:
โ 113 problems (113 errors, 0 warnings)
102 errors, 0 warnings potentially fixable with the `--fix` option.
Found using: npm run lint
The algorithm as it currently stands only plays new tiles off of existing tiles. this means that if there is a vertical word going up to the row before the top row, it will never play a horizontal word in the top most row
example: CAT will never be played horizontally in the top row
"-,-,-,-,-"
"-,-,-,a,-"
"-,-,-,n,-"
Update on this is below...
when the server frontend is shutdown, the server crashes with this error
C:\Users\chris\Desktop\Red-Team\Server Backend\entities\ServerManager.js:60
if (p.socket === socket) {
^TypeError: Cannot read property 'socket' of null
at ServerManager.findWhichPlayerLeft (C:\Users\chris\Desktop\Red-Team\Server Backend\entities\ServerManager.js:60:15)
at Socket.socket.on (C:\Users\chris\Desktop\Red-Team\Server Backend\entities\ServerManager.js:42:41)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Socket.emit (C:\Users\chris\Desktop\Red-Team\Server Backend\node_modules\socket.io\lib\socket.js:140:10)
at Socket.onclose (C:\Users\chris\Desktop\Red-Team\Server Backend\node_modules\socket.io\lib\socket.js:452:8)
at Socket.ondisconnect (C:\Users\chris\Desktop\Red-Team\Server Backend\node_modules\socket.io\lib\socket.js:416:8)
at Socket.onpacket (C:\Users\chris\Desktop\Red-Team\Server Backend\node_modules\socket.io\lib\socket.js:338:12)
at C:\Users\chris\Desktop\Red-Team\Server Backend\node_modules\socket.io\lib\client.js:193:16
at _combinedTickCallback (internal/process/next_tick.js:131:7)
[nodemon] app crashed - waiting for file changes before starting...
there needs to be an event to swap out tiles and pass turn
When playing a two letter word as first word on empty board, more often then not frontend receives a INVALID_PLACEMENT error
this needs to happen at some point to avoid having to query the DB twice before sending an AI's word off to be played. Not super critical, just removes some query time and some error checking. Also this will stop the AI from swearing, so there is that.
Current Progress:
When anyone leaves the game, the Server Frontend should change the names to either the new person's name or Not Assigned
to signify no one is there.
Backend sends out dataUpdates incorrectly, causing the multiple AI to send in words to be validated without a properly updated boardstate. This allows for invalid words to be added to the board, which breaks the entire system.
This event will:
gameOver
eventboard
and dataUpdate
events to reset all data and to make a new gameToken verification not working on stats endpoints for some reason. @GDave50 add the error you get when you try to add the VerifyToken
middleware to the routes.
When decoding a username from a token, the username is undefined.
After a certain period of time (ranging from 1-2 minutes) the AI frontend and AI entities receive EVENT_DISCONNECT for no discernible reason. This may be due to the heartbeat timeout, which is when the server pings the client periodically to check if the client is still alive. I tried setting the timeout to infinite, which fixed nothing. Only thought is that the client and server connection gets interrupted by something. Possibly need to throw time intensive calculations into a separate thread in order to keep the heartbeat alive?
There is no set format for the data being sent in a endgame socket event. all it says is
"score": scores of game
"timeout": double
"gameData": array of all data of the scores and such
This must be refined.
When calling http://localhost:3000/api/teams/"Gold or Green" the output JSON from the database has a field that reads higestSingleGameScore, just a minor typo. When (or if) fixed let me know in discord so I can change one of my variable names and Gson doesn't break the stats program.
There should be a state/transition in the form of an event being sent and recieved from the server front end. Something such as "updateState" sent, then a "stateUpdated" sent back. this will hopefully help make the board state consistent
Moved to Jasmine, now tests are not running.
Picks up Jasmine, but won't run test.js
. Works on local machines.
The valid words dictionary and the invalid words dictionary have differences in the number of permutations per word, leading to bad words being able to be played on the game, which would cause Bastian to fall out of his chair. These differences have to be worked out at some point, at least before May 4th.
@cking20 can answer technical questions if I can't answer them.
I need to get all the Players in the game in JSON format. I'll need all the variables of Player.js as well as there should be another bool variable added called something like "isAI" to denote if that player is an AI. Also the order in which the Players are sent back matters. The order should be consistent with the way they are represented in the Game-manager or where ever the backend keeps track of the user's array
50/50 chance when adding suffix to a placement it creates an error
Towards the later stages of the game, when the AI are trying to think of words to play, they seem to be sending garbage plays to the server. A lot of garbage gets sent. Will need to hunt it down, but saw it when I glanced at the console at a moment.
This could actual be part of the bug in #201 .
When the AI connects to the server, the first word is played. On subsequent turns, however, the server breaks with an error of:
toUpperCase is not a function
Uncaught Promise Rejection
#101 Test fails, yet it still passes on Travis. Must figure out why and push changes.
Progress can be tracked via this Google Sheets Link:
Each JSON response needs to have a standardized response across all API calls.
Going to follow the JSON API v1.0 standard.
Each Response must have the following:
metadata
object: data that is not critical to the response (license, author, api version, etc.)data
object: data that is critical to the response (actual json response with the requested data)errors
object: data that is critical to a failed response (error code, message, status code)Bullet points with **
means that these objects cannot coexist in the same response.
Event name change so that the name is more generic and makes more sense when used in other places.
2/16 - 3/9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.