frankcollins3 / fcc-mcsft-cSharp

FreeCodeCamp & Microsoft C# course:
1 stars 0 forks source link

data typing issue with equality check [9:03am] #12

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: basic game logic with if statements: hero attacks monster. monster attacks hero. health decrements based on randomly generated value.

Screen Shot 2023-09-08 at 9 01 19 AM

error: Screen Shot 2023-09-08 at 9 01 33 AM Screen Shot 2023-09-08 at 9 01 30 AM

proposed approach: must be mistaken now could've sworn that == has been working for 'string'

frankcollins3 commented 1 year ago

👍 have to type it as string and use .Contains() Screen Shot 2023-09-08 at 9 05 33 AM [9:05am]