bimde / blackjack-server Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
@Netdex is using the first four cards + our code to determine the seed used for Collections#shuffle and predict the following cards. This gives his team an unfair advantage over other players.
To fix this we could shuffle the cards (without reloading the already used ones) after each turn or at another, quicker interval.
We need to either somehow organize the console messages or create a gui that displays all the events from every game
Randomize the ArrayList each time you deal. Because @Netdex
If a client wants to leave, do they send any 'soft disconnect' protocol, or does hitting the red square work too?
Accept sockets in a central server with arraylist of server objects. If player specifies play then place player in new lobby. If player specifies spectate then send back # of active active games and user returns index of game they want.
For example, after you broadcast the block of players' bets, broadcast a message that signals the end of that block, and the start of the next block.
Server should broadcast the dealer's first card before dealing any cards to any players, because some decisions can be based off of the current card the dealer has.
However, the other cards (face down card, and others that are drawn until dealer reaches 17) can be broadcasted later, because those are not important.
If a client's number of coins drops below 10, just kick them off as if they've lost. They can't bet anything anyway in the next round.
Make a version for AIs that remove sleeps, so that I don't have to wait twenty minutes for a single game to complete?
When the dealer blackjacks, I take it you calculate that when you "deal yourself" the card.
BUT can you at least first let all the players take turns and do their thing, because I have no idea how to deal with not being asked by the dealer for % playerNo turn... I mean, I could totally just put a goto but https://goo.gl/dA2hTy
EDIT (from Bimesh): This is also a problem because the player should still win if they get a blackjack (even if the dealer gets a blackjack).
When users bust after they double-down, the dealer fails to change the total coins of the user. This bug has been reproduced multiple times.
This only applies to AI's for some reason: maybe something to due with timing to messages and/ or specific AI case only.
Are all broadcasts separated by 500ms?
When it's a client's turn, the client says "hit" or "double down", are they replied by the server by a "# 0 rank suit" message by the server?
This goes against the 'send messages every 500ms rule'.
Also, this completely ignores the timer with messages being sent every 500ms
Only one of the classes should have this
"VinceFe%20lix\n#$ !*%@IainAI"
Have fun.
Can the shuffle protocol be changed, so that it's not whether or not the line exists, but something like:
"% SHUFFLE" and "% NOSHUFFLE"?
It's easier for doing checks and not as much of a headache.
Clients shouldn't have a list off all available servers + allocate themselves to a server. This is the primary functionality of the central server and should be handled there.
Is shuffle going to be at the end of each round (if it's going to be done in that instance?)
Change the ArrayList to ClientList
Add more comments
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.