Comments (4)
Hi @ptudan, are you able to fork the repo and open a PR against this repo from your fork?
On the specific issue, I believe the click library is parsing that command as "-p layers=VB, AB", hence that "first" player is not being parsed correctly and is dropped. I think the right approach to fixing this is: (1) remove the -p
alias in favor of always using --players
(as opposed to trying to handle when people use the wrong number of dashes); (2) change the for loop in simulate()
(see below)
catanatron/catanatron_experimental/catanatron_experimental/play.py
Lines 172 to 180 in 4b05b1c
It is better for the person running the CLI to know that they mistyped a player key, rather than have that key skipped altogether.
from catanatron.
I have a fix for this, but I can't seem to push a branch to open a pull request. Would be great if I could get that permission
It seems like the cli arg parser is shortening the players flag to -p when I didn't use two dashes, but then passing in the rest of the string as an arg (despite there not being a space). I get that this is sort of a user error, but I feel like its worth fixing anyway. I'd say either merge this fix in, or change the arg parser so that -players fails rather than fallsback to -p
I just added this in play.py simulate method
if len(player_keys) > 0:
player_keys[0] = player_keys[0].replace("layers=", "")
from catanatron.
Hey @ptudan, thanks for opening up the issue and taking a stab at this!
I like @pachewise's (1) solution. Let's go with that. That gives a user error the one attached, and I like --players=VB,AB
being more explicit / clear than something like -pVB,AB
anyways. So dropping support for -p
! 👍
Cooking a PR now.
from catanatron.
Addressed with #209.
from catanatron.
Related Issues (20)
- [React] Implement MOVE_ROBBER action
- [React][UI] Implement use Year of Plenty action
- [React][UI] Implement Use > Knight card
- [React][UI] Implement Use > Monopoly
- [React][UI] Implement "Use > Road Building".
- [React][UI] Disallow player to play development in the same turn it was bought
- [React] Play animations when resources are yield
- [Python] Make MARITIME_TRADE action's value a 10-integer list HOT 2
- pips/dots for numbers in UI
- Improve catanatron-play load time HOT 1
- Refactor code to avoid eager dependencies HOT 1
- Fix Overview.ipynb HOT 2
- Node production improperly calculated. HOT 1
- Gym seems to be broken? HOT 1
- Implement Card Counting HOT 1
- Implement returning all players points vs winner player colour HOT 1
- Create /mcts-score endpoint
- docker-compose images are outdated HOT 5
- [Python] Remove nxgraph dependency HOT 5
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 catanatron.