DawnC commited on
Commit
7210ddc
โ€ข
1 Parent(s): 0b1b099

Update scoring_calculation_system.py

Browse files
Files changed (1) hide show
  1. scoring_calculation_system.py +13 -0
scoring_calculation_system.py CHANGED
@@ -444,6 +444,19 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
444
  print("Missing Size information")
445
  raise KeyError("Size information missing")
446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  def calculate_space_score(size: str, living_space: str, has_yard: bool, exercise_needs: str) -> float:
448
  """
449
  1. ๅ‹•ๆ…‹็š„ๅŸบ็คŽๅˆ†ๆ•ธ็Ÿฉ้™ฃ
 
444
  print("Missing Size information")
445
  raise KeyError("Size information missing")
446
 
447
+ if user_prefs.size_preference != "no_preference":
448
+ if breed_info['Size'].lower() != user_prefs.size_preference.lower():
449
+ return {
450
+ 'space': 0,
451
+ 'exercise': 0,
452
+ 'grooming': 0,
453
+ 'experience': 0,
454
+ 'health': 0,
455
+ 'noise': 0,
456
+ 'overall': 0,
457
+ 'adaptability_bonus': 0
458
+ }
459
+
460
  def calculate_space_score(size: str, living_space: str, has_yard: bool, exercise_needs: str) -> float:
461
  """
462
  1. ๅ‹•ๆ…‹็š„ๅŸบ็คŽๅˆ†ๆ•ธ็Ÿฉ้™ฃ