Lesson 11.3 : Implementing a simple if statement in c

preview_player
Показать описание
Expect the next lesson at around 5:30 PM EST today.
Рекомендации по теме
Комментарии
Автор

Hmmm interesting, but what if lets say we have a situation like (1&&0) or (0&&1) and lets say it ok for it to have failed is there a way around this and give a half or partial effect so for instance lets say the Objective is to Deliver a Flag and also collect 5 stars, But lets say in either case you get 5 Experience and or score if you Get just any 1 of the Objectives but failed the other, But if somehow you Did complete both Objectives, you were awarded 20 Points instead, which effectively Is The Max experience and or score to get per game! I was thinking more like That circuit thingy called an Exclusive Or! Meaning its both an "AND", and an "OR", but from what I see here is if it fails anywhere along the line this part of the circuit can't be possible! The thing is the Games I create always will have conditions where it will test several [Exclusive Or's], I can effectively do this in batch script but what I do is not a series of tests all one after the next, what I do is a pattern of Tests and Jumps to the Next Test meaning, I Test if The Flag is Delivered and if so then it Jumps to a separate calculation which then Brings up the following Test to see if you have 5 Stars, Now if I can eliminate all this jumping around and if there was a way to Run the whole if Statement but in such a way that the Parts that were True can be spliced out of it effectively tossing out the failed Garbage! <-- Now this is the Type of Gold I am looking for in my programming, I hate having to run a series of tests by having to flip around things or having to create a bunch of off ramps to syphon down to the exact goal, Granted this is Just a test of two items, But what if I had to create a Save File Code that only ever printed an encrypted password code of Just the items, current missions, and Quantity, and stats, of Just what pertains to the Character at that moment, Meaning I can effectively Truncate all things out of the Save Code that is at 0 or just doesn't exist at that point of time, meaning it only saves the important stuff! Like 2 items is easy to do 4 separate statements to see (0, 0) (0, 1) (1, 0) (1, 1) but This code would be extensive To do Partials on if there was like over 20, 000 things to keep track of for instance! So lets see how you would re-route this if statement around that it can test Your 3 values but doesn't Care if any Failed, but Only say which ones in the series of tests were True, but leave out the failed ones! Because True is the only thing we care about!

sarainiaangelsong
Автор

man i know u made a bad decision but the world really lost a great mind

danielcohenemail
welcome to shbcf.ru