Skip to content

Commit

Permalink
loadData trully fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanloy committed Mar 7, 2019
1 parent 2b971ae commit 6660821
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class LevelListActivity : AppCompatActivity(), LevelListListener, View.OnClickLi
if(data != null) {
var parsedData = data.split(" ")
if (parsedData.size > 0) {
for (i in 0..levels.size) { //TODO Hardcoded
for (i in 0..levels.size - 1) { //TODO Hardcoded
var line = parsedData[i].split(",")
levels[i].unlocked = line[0].toBoolean()
levels[i].completed = line[1].toBoolean()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class MainMenuActivity : AppCompatActivity(), View.OnClickListener {
if(data != null) {
var parsedData = data.split(" ")
if (parsedData.size > 0) {
for (i in 0..levels.size) { //TODO Hardcoded
for (i in 0..levels.size - 1) { //TODO Hardcoded
var line = parsedData[i].split(",")
levels[i].unlocked = line[0].toBoolean()
levels[i].completed = line[1].toBoolean()
Expand Down

0 comments on commit 6660821

Please sign in to comment.