Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giocatore Random rimane con una sola pedina: IllegalArgumentException #5

Closed
GiacomoPinardi opened this issue Apr 12, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@GiacomoPinardi
Copy link

GiacomoPinardi commented Apr 12, 2019

Giocando come giocatore Random alle linee 153 e 239 della classe TablutRandomClient Random.nextInt viene chiamato con argomento pawns.size() - 1 che risulta essere 0 essendoci solo una pedina rimasta.

Questo lancia una IllegalArgumentException: bound must be positive che fa perdere la partita al giocatore.

E' un problema secondario, e non relativo alle regole del gioco, ma volevo comunque segnalarlo.
Saluti

AGalassi added a commit that referenced this issue Apr 15, 2019
@AGalassi AGalassi added the bug Something isn't working label Apr 15, 2019
@AGalassi AGalassi self-assigned this Apr 15, 2019
AGalassi added a commit that referenced this issue Apr 15, 2019
@AGalassi
Copy link
Owner

Dovrebbe essere corretto ora

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants