avesanen / mafiachat Goto Github PK
View Code? Open in Web Editor NEWMafia party game in a chatroom format
Mafia party game in a chatroom format
By default return 'unknown' faction for each player in gameInfo's player list. These override the default:
So that no one in the same room can see icons revealing who you are
This is how I encountered the bug:
Makes it easier to see when game is started and if it's day or night
Show who has voted on day, on night only show it to own faction.
dead players keep their faction,
observers only see villager chat, not anyones factions.
Move messagebuffer from game to player, so partial updates are possible when optimizing network performance (if at all needed), and to hide chats that do not belong to the player.
Show the result for cops in the end of the night. That way we can prevent cops to reveal their findings during night. This is needed also if we have multiple cops and only one player's faction can be revealed.
Shuffle roles when game starts.
This seems like a good way:
dest := make([]int, len(src))
perm := rand.Perm(len(src))
for i, v := range perm {
dest[v] = src[i]
}
-2d graphics boolean for game model
-x,y coordinates in player model
-move actionMessage with new coordinates
-broadcast new coordinates for every player
To reproduce:
Something to do with the quorum fix I made? Never encountered this bug before. Not played with 10 people either.
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.