Comments (1)
This is being handled by, what I'm calling, a truth tree. Until I find out the correct name for it anyway.
Each node of the tree can have children and more detail of an action is explained with subsequent children.
return new Tree() {
new ProconAgent() {
new KnowsWhen() {
new PlayerAgent() {
new Kills() {
// Procon KnowsWhen Player Kills Player
new PlayerAgent()
},
new Chats() {
new To() {
// Procon KnowsWhen Player Chats To Server
new ServerAgent(),
// Procon KnowsWhen Player Chats To Group
new GroupAgent()
}
}
}
},
new CanDo() {
new Chats() {
new To() {
// Procon CanDo Chats To Group
new ServerAgent(),
// Procon CanDo Chats To Group
new GroupAgent(),
// Procon CanDo Chats To Player
new PlayerAgent()
}
},
new Kills() {
new To() {
// Procon CanDo Kills to Player
new PlayerAgent()
}
}
}
}
};
This can then be polled with the following
tree.Exists(new ProconAgent(), new CanDo(), new Chats(), new To(), new GroupAgent());
You can supply it with as much detail as required, so to find out if Procon can in some form send chat to the server you would just do:
tree.Exists(new ProconAgent(), new CanDo(), new Chats());
It allows for descriptive but flexible method of a protocol implementation describing what is possible and what is known. We may be able to then shorthand this to simple "TruthBuilder", but at least the underlying functionality can be described in great detail and extended if a game comes along that has some truly unique functionality.
from potato.
Related Issues (20)
- Investigate move from Remoting to WCF
- Replace obsolete "Additional" within IProtocol
- Include Guest group as a default pool for players
- Accounts should be able to set their own language
- Command.ToConfigCommand nulling scope
- Simple configuration via command line arguments
- Include simple security commands to setup initial accounts/groups/permissions
- Users should not be able to lock themselves out of the system
- Add localisation for new vehicle kill codes in BF4
- Ensure Myrcon.* packages originate from official source HOT 1
- Periodically save configs
- Packages are not being pulled from the repository
- Remove ProtocolState from protocol events HOT 1
- Add session tokens to player account
- Include license in compiled package
- Simplify streaming account permissions HOT 1
- Include encryption on config commands HOT 1
- Include AbbreviatedName in game mode HOT 2
- Potato.Tools.NetworkConsole outputs to debug directory
- Create plugin developer tool
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from potato.