Cultivation Department Shura Field
Chapter 73 073 Science Fiction
Chapter 73 073 Science Fiction
After spending his birthday with Tang Lingfei and the others, Xu Zhe still had to go to school to exercise his thinking the next morning.
But what was different from the previous few visits was that today he had a laptop in his bag.
Since I had agreed with Shen Lan before that I would teach her programming, then of course it would be best to use a computer for on-site teaching.He didn't know if this senior was really that interested in programming, but he planned to teach well.To this end, he even prepared a vivid case.
If he can be taught successfully, he may not only gain a smart helper in the future, but also gain a friend with whom he can talk about more common topics.
Although in the six months since his rebirth, his interpersonal relationships have become much stronger than in his previous life, and he has had many interesting experiences, his greatest strength and hobby is programming.It's a pity that no one around me, whether they are students of the same age or parents and teachers, can talk about this.This made Xu Zhe feel a little unmotivated at times.
So after today's Mathematical Olympiad class ended, Xu Zhe picked up his schoolbag and placed it on Shen Lan's desk.
Shen Lan noticed that the schoolbag seemed heavy: "This is..."
Xu Zhe smiled slightly: "Do you still remember what I want to teach you?"
Shen Lan was shocked and said, "Did you bring it to school?"
Xu Zhe: "I don't think there's a need to go to the billiard hall today. It's just right here in this classroom."
"What's the right thing to do?"
Xu Zhe and Shen Lan turned their heads following the sound and saw the classmate named Wei Junkun.
In the silent gazes of the two people, Wei Junkun felt a trace of pressure, as if he had barged into an occasion that he shouldn't have come to, and became very redundant...
"Aren't you hungry? I have to eat quickly."
Wei Junkun retreated hastily.
At this time, other students in the competition group also packed up and left, leaving only Xu Zhe and Shen Lan in the classroom.
Xu Zhe: "Are you hungry? How about I pack a portion of cold skin and eat while we talk?"
Shen Lan stood up with a smile: "I'll go buy Liangpi. Just wait here for me."
----
The cold skin that Shen Lan packed back was delicious, but Xu Zhe encountered a small problem.
He wanted to give Liangpi's money to Shen Lan, but was rejected.
Liangpi costs four yuan, and a bottle of orange juice costs three yuan each. Logically speaking, he should give him seven yuan, but Shen Lan wouldn't accept it at all.
"Just think of it as my treat, Teacher Xu. Please give me a good lesson."
Xu Zhe: "...Okay, let me show you a case now. If you want to learn programming, I think it is better to start with vivid cases instead of reading textbooks."
With that said, he took out the notebook from his schoolbag, placed it on his senior's desk, and turned it on.Then he took out the charging cable and plugged it into the socket on the wall in front of the classroom.Once he was sure the socket had power, he was completely relieved.
Shen Lan sat there with her chin in one hand, looked at him, smiled and asked, "Do you want to use the outsourcing work you do as a teaching case?"
Xu Zhe: "No, those are still too boring. So I wrote a game last night."
Shen Lan couldn't help but be stunned: "Did you write the game yourself?"
Xu Zhe: "Yes, a very simple, puzzle-type match-[-] game." These words really confused Shen Lan.She knew mini-games, and she had some idea of puzzle games, but what were match-[-] games?
But when Xu Zhe clicked on the game and let her play, she quickly understood.
The rules of this game are very simple.In the game screen, there are many small squares stacked together. Every time you click on a small square, it will be transferred to the long frame.There are seven positions in the box, and they can be eliminated by collecting three of the same small squares.
Banana, corn, cabbage, radish... different types of small squares, distinguished by simple icons.
After Shen Lan played for a while, she couldn't help but exclaimed: "You made this by yourself?!"
Xu Zhe: "Yes."
Shen Lan: "It's a bit like Lianliankan, but different...have you given it a name?"
"A sheep?" Xu Zhe smiled, "Actually, the name doesn't matter. This game is effortless to play, it's very simple."
Shen Lan: "Have you ever thought about posting it online?"
Xu Zhe: "I have thought about it, but it is not suitable now. The Pingguo store currently only has a buyout system and cannot make free in-app purchases. If it is posted directly online like ordinary mini-games, it will appear on 4399 before it can make me money. Places like that. It’s so easy for people to pirate.”
Shen Lan blinked and realized that the information she knew was incomparable to Xu Zhe's, so she could only shut her mouth.
Xu Zhe tried to inspire her and said, "The logic of this game is very simple. Do you want to try to think of how to describe it in a purely logical way?"
Shen Lan thought for a moment and shook her head helplessly: "I really don't know anything about programming."
Xu Zhe: "It doesn't matter. Let's ignore the details first and talk about the main logic. First, let the computer randomly create blocks and arrange them randomly. When arranging, add three-dimensional coordinates, although it will only display two dimensions. Then, the system checks For each block, see if there are other blocks in front of it that block it. If it is blocked, make the block gray and cannot be clicked; if it is not blocked, keep the original color and can be clicked."
Shen Lan followed his train of thought and subconsciously asked, "What next?"
Xu Zhe spread his hands and said, "Then it will be OK."
Shen Lan blinked her eyes and gradually opened her mouth: "Is it that simple? Impossible!"
Xu Zhe smiled and said: "Of course there are many details to take care of in the actual operation. But the logic of creating a game is as simple as that. And the player's operation method is equally simple to implement. After the player clicks on the square, he adds the number of clicks to the stack. If the same three are eliminated, if the total reaches seven, you will die and the game is over."
Shen Lan also followed his explanation, stared at the screen and pondered for a while, and suddenly realized a certain problem in this logic.
"No, then you can't guarantee that this game has a solution! Maybe as you play, you will find that the blocks you need are buried underneath, making it impossible to play further."
Hearing what she said, Xu Zhe's mouth suddenly opened and he smiled very happily.
"Hahahaha," Xu Zhe laughed, "This game may not necessarily be able to be cleared. No, it should be said that it depends on luck and a lot of attempts to pass the level."
Shen Lan was a little unhappy: "Then what's the point of spending a long time playing this?"
Xu Zhe: "The meaning of this kind of thing is what attracts people's time and energy. Or you can also say that the concept of meaning does not exist in the first place... Well, I am actually just writing a very simple game case to let you understand. Just some programming ideas.”
Shen Lan said thoughtfully: "I kind of understand. It would be great if the computer teacher taught like you..."
----
Thanks to the fish-loving Samoyed, Fanqi, Yudaozi, and Baier Qin Guan Zhong Chu for the reward!
By the way, the free reader group for this book has been opened. Click on the introduction of the book's homepage in the mobile APP, and you can apply to join the group with one click. You can pass by answering the protagonist of this book~~
(End of this chapter)
After spending his birthday with Tang Lingfei and the others, Xu Zhe still had to go to school to exercise his thinking the next morning.
But what was different from the previous few visits was that today he had a laptop in his bag.
Since I had agreed with Shen Lan before that I would teach her programming, then of course it would be best to use a computer for on-site teaching.He didn't know if this senior was really that interested in programming, but he planned to teach well.To this end, he even prepared a vivid case.
If he can be taught successfully, he may not only gain a smart helper in the future, but also gain a friend with whom he can talk about more common topics.
Although in the six months since his rebirth, his interpersonal relationships have become much stronger than in his previous life, and he has had many interesting experiences, his greatest strength and hobby is programming.It's a pity that no one around me, whether they are students of the same age or parents and teachers, can talk about this.This made Xu Zhe feel a little unmotivated at times.
So after today's Mathematical Olympiad class ended, Xu Zhe picked up his schoolbag and placed it on Shen Lan's desk.
Shen Lan noticed that the schoolbag seemed heavy: "This is..."
Xu Zhe smiled slightly: "Do you still remember what I want to teach you?"
Shen Lan was shocked and said, "Did you bring it to school?"
Xu Zhe: "I don't think there's a need to go to the billiard hall today. It's just right here in this classroom."
"What's the right thing to do?"
Xu Zhe and Shen Lan turned their heads following the sound and saw the classmate named Wei Junkun.
In the silent gazes of the two people, Wei Junkun felt a trace of pressure, as if he had barged into an occasion that he shouldn't have come to, and became very redundant...
"Aren't you hungry? I have to eat quickly."
Wei Junkun retreated hastily.
At this time, other students in the competition group also packed up and left, leaving only Xu Zhe and Shen Lan in the classroom.
Xu Zhe: "Are you hungry? How about I pack a portion of cold skin and eat while we talk?"
Shen Lan stood up with a smile: "I'll go buy Liangpi. Just wait here for me."
----
The cold skin that Shen Lan packed back was delicious, but Xu Zhe encountered a small problem.
He wanted to give Liangpi's money to Shen Lan, but was rejected.
Liangpi costs four yuan, and a bottle of orange juice costs three yuan each. Logically speaking, he should give him seven yuan, but Shen Lan wouldn't accept it at all.
"Just think of it as my treat, Teacher Xu. Please give me a good lesson."
Xu Zhe: "...Okay, let me show you a case now. If you want to learn programming, I think it is better to start with vivid cases instead of reading textbooks."
With that said, he took out the notebook from his schoolbag, placed it on his senior's desk, and turned it on.Then he took out the charging cable and plugged it into the socket on the wall in front of the classroom.Once he was sure the socket had power, he was completely relieved.
Shen Lan sat there with her chin in one hand, looked at him, smiled and asked, "Do you want to use the outsourcing work you do as a teaching case?"
Xu Zhe: "No, those are still too boring. So I wrote a game last night."
Shen Lan couldn't help but be stunned: "Did you write the game yourself?"
Xu Zhe: "Yes, a very simple, puzzle-type match-[-] game." These words really confused Shen Lan.She knew mini-games, and she had some idea of puzzle games, but what were match-[-] games?
But when Xu Zhe clicked on the game and let her play, she quickly understood.
The rules of this game are very simple.In the game screen, there are many small squares stacked together. Every time you click on a small square, it will be transferred to the long frame.There are seven positions in the box, and they can be eliminated by collecting three of the same small squares.
Banana, corn, cabbage, radish... different types of small squares, distinguished by simple icons.
After Shen Lan played for a while, she couldn't help but exclaimed: "You made this by yourself?!"
Xu Zhe: "Yes."
Shen Lan: "It's a bit like Lianliankan, but different...have you given it a name?"
"A sheep?" Xu Zhe smiled, "Actually, the name doesn't matter. This game is effortless to play, it's very simple."
Shen Lan: "Have you ever thought about posting it online?"
Xu Zhe: "I have thought about it, but it is not suitable now. The Pingguo store currently only has a buyout system and cannot make free in-app purchases. If it is posted directly online like ordinary mini-games, it will appear on 4399 before it can make me money. Places like that. It’s so easy for people to pirate.”
Shen Lan blinked and realized that the information she knew was incomparable to Xu Zhe's, so she could only shut her mouth.
Xu Zhe tried to inspire her and said, "The logic of this game is very simple. Do you want to try to think of how to describe it in a purely logical way?"
Shen Lan thought for a moment and shook her head helplessly: "I really don't know anything about programming."
Xu Zhe: "It doesn't matter. Let's ignore the details first and talk about the main logic. First, let the computer randomly create blocks and arrange them randomly. When arranging, add three-dimensional coordinates, although it will only display two dimensions. Then, the system checks For each block, see if there are other blocks in front of it that block it. If it is blocked, make the block gray and cannot be clicked; if it is not blocked, keep the original color and can be clicked."
Shen Lan followed his train of thought and subconsciously asked, "What next?"
Xu Zhe spread his hands and said, "Then it will be OK."
Shen Lan blinked her eyes and gradually opened her mouth: "Is it that simple? Impossible!"
Xu Zhe smiled and said: "Of course there are many details to take care of in the actual operation. But the logic of creating a game is as simple as that. And the player's operation method is equally simple to implement. After the player clicks on the square, he adds the number of clicks to the stack. If the same three are eliminated, if the total reaches seven, you will die and the game is over."
Shen Lan also followed his explanation, stared at the screen and pondered for a while, and suddenly realized a certain problem in this logic.
"No, then you can't guarantee that this game has a solution! Maybe as you play, you will find that the blocks you need are buried underneath, making it impossible to play further."
Hearing what she said, Xu Zhe's mouth suddenly opened and he smiled very happily.
"Hahahaha," Xu Zhe laughed, "This game may not necessarily be able to be cleared. No, it should be said that it depends on luck and a lot of attempts to pass the level."
Shen Lan was a little unhappy: "Then what's the point of spending a long time playing this?"
Xu Zhe: "The meaning of this kind of thing is what attracts people's time and energy. Or you can also say that the concept of meaning does not exist in the first place... Well, I am actually just writing a very simple game case to let you understand. Just some programming ideas.”
Shen Lan said thoughtfully: "I kind of understand. It would be great if the computer teacher taught like you..."
----
Thanks to the fish-loving Samoyed, Fanqi, Yudaozi, and Baier Qin Guan Zhong Chu for the reward!
By the way, the free reader group for this book has been opened. Click on the introduction of the book's homepage in the mobile APP, and you can apply to join the group with one click. You can pass by answering the protagonist of this book~~
(End of this chapter)
You'll Also Like
-
I met the school beauty, and all my boasts came true.
Chapter 313 5 hours ago -
All people change their jobs: I am the origin of blood
Chapter 250 5 hours ago -
Slay the God: Sign in to Thunder General at the beginning
Chapter 182 5 hours ago -
Zongwu: People on Peach Blossom Island rely on their understanding to become immortals
Chapter 131 5 hours ago -
Tokyo Ghoul: Fusion of Madara! Unlimited Moonlight Reading
Chapter 283 22 hours ago -
I'm writing a diary in fantasy, I'm really not a Cao thief
Chapter 227 22 hours ago -
I was expelled at the beginning, and after I became a god, the sect begged for forgiveness
Chapter 359 22 hours ago -
The Dragon from Hell
Chapter 2540 22 hours ago -
Weird Resurrection: I Can Transform into a Great Demon
Chapter 834 22 hours ago -
The abyss invaded, and I awakened my magic profession!
Chapter 216 23 hours ago