Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hqqaazz authored Oct 6, 2020
1 parent 5aa7e14 commit 8742532
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def ordering(wantedlist,inital_penalty = 0):
if wantedlist == []:
print("NO enchantment given")
print("Cannot enchant: no enchantment given")
return
sortedlist, numlist = enchantment_split(wantedlist)

Expand All @@ -29,7 +29,7 @@ def ordering(wantedlist,inital_penalty = 0):
xp_list, max_step = enchant_layer(total_step, total_enchantment, inital_penalty)

if penalty > 6:
return "Error!Cannot enchant!penalty larger than 6"
return "Cannot enchant: final penalty larger than 6"


while numlist:
Expand Down Expand Up @@ -60,6 +60,8 @@ def ordering(wantedlist,inital_penalty = 0):


xp_max = max(xp_list)
if xp_max > 39:
return "Cannot enchant! max xp larger than 39


#penalty of merged books
Expand Down

0 comments on commit 8742532

Please sign in to comment.