Easy mode — 5 tries
$1,000 correct digit, correct position
$100 correct digit, wrong position
$0 digit not in the code
No repeated digits.
Hard mode — 6 tries
$1,000 correct digit, correct position
$124 repeated digit, wrong position
$100 correct digit, wrong position
$0 digit not in the code
Digits may repeat. $124 means a repeated digit is misplaced.