Chapter 32: Rainfall
Xiao Yi, who was lying on the bed, entered the consciousness space. Think about how it rains!
But after thinking about it for a while, Xiao Yi didn't know where to start.
Change the address of water from somewhere else to the current place? This is not called rainfall! It can only be called watering the land! Change the address of rainwater to the air? You can't control the amount of water! Maybe if you don't get it right, it will cause flooding!
In the end, Xiao Yi didn't come up with a specific way! Obviously, it is obviously not feasible to directly manipulate the data in the universe database, after all, data is data, and it is a combination of one by one, and this rain is a variety of combinations! It is impossible to change it all at once.
Only now did I know that I didn't understand the structure of the heaven and earth database at all, and the most I could do was to change an existing thing, that is, to change a person's address coordinates in the front, or to change a person's lifespan, health, etc.! But when encountering a variety of combinations, Xiao Yi didn't know how to deal with it.
It's like this rain, and it has to be completely controlled from start to finish, so that the sky really rains.
Since he couldn't think of a good way, Xiao Yi also began to think about it with program logic, from the first step to the end, what needs to be experienced in the middle!
First of all, you need: water, clouds, wind, thunder, lightning, air pressure, temperature, rain, these related variable values are the enumerations defined in the program!
The first is the formation of water, which can be ignored for now, there is so much water on the earth, and you don't have to create water as a substance.
The second is clouds, the formation of clouds is that water is affected by high temperatures and turns into water vapor, rises into the air and gathers together, condenses together through the action of cold air, and through hot air, aerodynamic forces and other factors, the clouds will be formed in the air and will not fall down!
The third is the wind, the formation of the wind is formed by the flow of air, as for what else depends on it, it is not considered for the time being, as long as it can be used
The fourth thunder, this one is the sound of the collision between the clouds!
The fifth lightning bolt is the collision of clouds, which creates friction, and the water molecules collide with each other, generating static electricity, which is then generated by various factors!
The sixth air pressure doesn't need to be thought about
The seventh temperature, this is something that needs to be considered, and the water, snow, or fog that can eventually reach the ground all depends on this, so the temperature must be mastered.
The last one is the rain, which is the final formation method, the result of the collision of clouds, atmospheric pressure, and temperature.
。。。。。。
Slowly clarifying his thoughts, Xiao Yi's mind is becoming clearer and clearer, several substances are variables and enumerations, and the process of forming several substances is the method!
All you need to do is define these variables and write down the methods for forming them!
The last rain is the final combination of methods!
Thinking about all this, Xiao Yi also began to program experiments
The first one begins by declaring the material variables, water vapor, air pressure, air, water molecules, temperature, and so on.
The second is the method of writing the formation of matter.
First of all, the method of air pressure!
After all, there is air pressure to carry the weight of the cloud, so it will not fall! So this method is very important, as for the formation of the principle of air pressure, this is not difficult Xiao Yi, I directly query the database air pressure data to extract, and then copy it into the program! As a programmer, if you don't understand such a simple method, you don't have to look for a job, you have to find the formation principle of every development tool, and you have to analyze his way for every method, then you will specialize in this for the rest of your life, and the company can't afford to support you.
The first method is fine, and then the second method is time to write the method of forming clouds!
Take down the variable of water vapor and change the path coordinates of the variable of water vapor, this is also very simple, and it can be done directly, there are so many water true qi in heaven and earth! It's okay to use it, the formation method is good, and then the number of formations, the distance of formation, OK, all done! Some people say why not move the clouds over? Although this is convenient, if you move the clouds in other places, it will not rain in other places! Xiao Yi wants to create a rain process by himself, that is, write a rain program for everyone.
The third method is the collision method
This method is more important, all clouds have been formed, how can you form thunder and lightning if you don't collide, how can you finally form rain! Write the collision speed, then the collision strength, and then the number of collisions, write it in turn, and check it is correct!
The fourth is the temperature regulation method
The temperature method is also simple, and the parameters are passed in directly through thinking, but after all, it still needs to be defined, the temperature of rain is set to 0 degrees Celsius, the temperature of snow is set to -5 degrees Celsius, the temperature of hail is set to -20 degrees Celsius, and the temperature of fog is set to 10 degrees Celsius!
Once the program is written, it's time to start testing the method.
Xiao Yi got up and went to the toilet, because it was the most convenient place to do experiments, and he didn't have to worry about getting the room wet.
When he arrived at the toilet, Xiao Yi began to call the method test
Invoke the barometric pressure method, pass in the parameters, location, altitude, OK, test
The method was successfully called, the system gave a hint, Xiao Yi touched the air in front of him with his hand, and felt that there was something to support his hand, and he couldn't put it down to a certain extent. Xiao Yi was secretly proud in his heart, can I use this thing to generate a method under my feet, and then change the air pressure movement method? Then can I fly directly? But think about it now, it is not suitable to do this experiment, and in the future, let's do a good job of the rainfall system first!
Call the method that generates the cloud, pass in the parameters, location, height, distance, thickness, size.
Two small clouds suddenly formed above the baropause. Constant flow
Call the collision method, pass in the collision force, and the number of times.
Two small clouds directly began to collide, knocking the formed clouds apart. Xiao Yi also remembered the faint thunder in his ears, accompanied by faint lightning in the air.
Call the temperature method and pass in the parameter temperature
Choose Rain: Small raindrops fall directly to the ground!
Choose the snow: Small snowflakes fall
Choose Hail: Dozens of Xiaoice hail fell
Choose the fog: Fog suddenly rises in the toilet.
All the methods have been successfully tested, no bugs have been found, Xiao Yi also breathed a sigh of relief, this system is strictly speaking, Xiao Yi's first brain-draining system. Unlike the previous express delivery system, which only needs to change some data of the parties, this rainfall system, but a lot of formation methods have been written, and it was finally successful.
Since there is no problem with the system, Xiao Yi also needs to find a carrier, but after looking around, he did not find a suitable one, and finally loaded this rainfall system onto the wooden ring in Xiao Yi's hand. It is also convenient to use in the future.
Now that the system and test have been successful, there is no problem, and Xiao Yi is ready to start tonight's rain operation.
Because now that there is air pressure above the earth, Xiao Yi doesn't need to choose the method of air pressure, and directly calls the method of forming clouds!
Incoming parameters, location, over the village, number of formations, 20.
Call the collision method!
Call temperature, choice, rain.
The setting is successful, select the execution time, and execute it immediately!
If someone were outside now, looking up at the sky, they would surely find that the originally bright sky was gradually darkening, and the dark clouds above the sky were forming at a speed visible to the naked eye, no more, no less, exactly 20 flowers, covering the entire village! The formed dark clouds suddenly began to swim, and the clouds began to collide! Boom! The loud thunder woke up the old man and the child who were already asleep. Blinding lightning lit up the night sky!
The old man who woke up got up, opened the curtains, and looked out the window, this is going to rain? It has been dry for several months, and it should be raining! Some old people even couldn't help but shed tears, and after a few months of drought, the farmer could not live, the well water was dry, and the vegetables were almost gone.
In a small ruined temple not far from the village, an old man looked up at the sky and wondered, "It shouldn't rain at this time!
After looking up for a while, he didn't feel any demonic energy, and the old man didn't care anymore, and continued to close his eyes and meditate.
The next village was also awakened by the thunder, and came out to take a look, but found that it was raining in other villages not far away! There was not even a single cloud above his village, and he suddenly sighed a little, our village has not done anything bad or evil! Why does God just give rain to other villages, but we don't have a drop here!
The meteorological station in the county has also received the news! What's going on in this area lately, why should it rain when it's obviously impossible to rain? The weather forecast has been broadcast, and has made us lose our trust in others? Recently, many people don't believe in the weather forecast anymore, and they have to reverse it every time they make a forecast.
Xiao Yi also smiled, if it really rained, there is no problem with programming the system by yourself, wait and see if the rain is enough, if it is not enough, add some, now if you want to rain, you only need to have a thought for yourself!
Xiao's mother saw that the light in Xiao Yi's room was still on, walked in directly, and saw that Xiao Yi hadn't slept yet, so she asked Xiao Yi, "Is this what you did?"
Xiao Yi nodded.
Xiao's mother also smiled, doing good deeds for the villagers and fathers, it is not my son! Now the village doesn't have to worry anymore! How great the ability is, how great the responsibility is, and if you can help the villagers, you must help more, and there must be a reason why God gave you the opportunity.
Xiao Yi nodded again and said, "I know, Mom, I will help the blind dates, after all, they have helped me, and I can't be ungrateful."
"Yes, you understand!" I'll go back and rest first, and you can rest well
"Okay, Mom"