Comments (2)
The CanBuild() function still lacks a check for surrounding roads and settlements, which means that a road can only be built on an edge that is connected to a vertex that has a settlement of the current player on it, or if any of its four neighboring edges already have a road belonging to the current player.
from catan-engine.
The order of checks in the CanBuild() method should be rearranged so that the simplest checks are evaluated first. This approach can help minimize the number of calls to the more resource-intensive LINQ expressions, by adopting a fail-fast, fail-early strategy.
Also checks on IsRoad could be removed since Belongs would imply that a road is already built.
This goes for #7 aswell.
from catan-engine.
Related Issues (19)
- vectorizable game state
- implement game tiles
- implement production circles
- cube coordinate system HOT 2
- board setup algorithm
- special tiles for map edges
- add settlements
- other components
- game phases
- player encoding
- refactor interfaces HOT 2
- add bank HOT 1
- resource production phase
- harbor alignment is wrong
- longest road HOT 1
- lazy eval of linq messes with player rotation
- remove redundant information
- state serialization
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 catan-engine.