Kaggle / Kaggle/kaggle-environments

KoreJson.getDoubleArrFromJson is broken

Open Beginner friendly
#193 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
452
Forks
190
Avg merge
31m
Merged PRs (30d)
2

Description

KoreJson.getDoubleArrFromJson does not correctly parse arrays of doubles! This leads to kore being incorrect (zero) in Board.

https://github.com/Kaggle/kaggle-environments/blob/ec90612db9c035af91b26f029a862e6b1a185ff6/kaggle_environments/envs/kore_fleets/starter_bots/java/kore/KoreJson.java#L88

Proposed fix:
```java
for (int i = 0; i < arrStrParts.length; i++) {
```

Contributor guide

Open the contributing guide

Research direction

Open starter_bots/java/kore/KoreJson.java at the linked getDoubleArrFromJson implementation around line 88. Check how the array string is split and compare the loop bound with the proposed fix. Done means arrays of doubles parse correctly so the kore value in Board is no longer zero; no test file is mentioned.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.