Skip to content

Commit

Permalink
handled uzbekistan goods case
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaysanganal committed Sep 12, 2018
1 parent 0f0bc0b commit 0e28598
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
Binary file modified Child Labor/.DS_Store
Binary file not shown.
10 changes: 8 additions & 2 deletions Child Labor/CountryController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,17 @@ class CountryController: UITableViewController, UICollectionViewDataSource, UICo
// Add the exploitation type to an array
if childLaborStatusForGood == "Yes" && forcedLaborStatusForGood == "No" {
exploitations.add(0)
} else if childLaborStatusForGood == "No" && forcedLaborStatusForGood == "Yes" {
}
else if childLaborStatusForGood == "No" && forcedLaborStatusForGood == "Yes" && forcedChildLaborStatusForGood == "Yes" {
exploitations.add(3)
}
else if childLaborStatusForGood == "No" && forcedLaborStatusForGood == "Yes" {
exploitations.add(1)
} else if childLaborStatusForGood == "Yes" && forcedLaborStatusForGood == "Yes" && forcedChildLaborStatusForGood == "No" {
exploitations.add(2)
} else {
}

else {
exploitations.add(3)
}
}
Expand Down
6 changes: 5 additions & 1 deletion Child Labor/GoodController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ class GoodController: UITableViewController {
// Add the exploitation type to an array
if country["Child_Labor"].element?.text == "Yes" && country["Forced_Labor"].element?.text == "No" {
exploitations.add(0)
} else if country["Child_Labor"].element?.text == "No" && country["Forced_Labor"].element?.text == "Yes" {
}
else if country["Child_Labor"].element?.text == "No" && country["Forced_Labor"].element?.text == "Yes" && country["Forced_Child_Labor"].element?.text == "Yes" {
exploitations.add(3)
}
else if country["Child_Labor"].element?.text == "No" && country["Forced_Labor"].element?.text == "Yes" {
exploitations.add(1)
} else if country["Child_Labor"].element?.text == "Yes" && country["Forced_Labor"].element?.text == "Yes" && country["Forced_Child_Labor"].element?.text == "No" {
exploitations.add(2)
Expand Down

0 comments on commit 0e28598

Please sign in to comment.