Using java to develop the most gorgeous skills of DOTA Heroes (example explanation)

I love Java and dota. I have a whim to use java to develop the skills of Carl, one of the most gorgeous heroes of DOTA operation. Because I am Xiaobai, please forgive me for the lack of code. Students with the same hobbies are welcome to study together.

Submit my code first

First, let's introduce the general execution process of my code

1. First, reference scanner to define an object SC, and then define three different elements (Q --- ice, w --- ray and e --- fire)

2. Input elements three times with the keyboard (Q, W, e input three times at will)

3. Use the for statement to cycle three times and count (execute once Q, COUNT1 plus 1, execute once W, COUNT2 plus 1, execute once Q, count3 plus 1)

4. After inputting elements three times, input r to synthesize skills, and use an IF statement to judge whether to input R. if the input continues, if the input is wrong, the skill cutting fails, and the output "you need to press R, if you don't press R, you can't synthesize skills".

5. Enter R and continue to execute. Use the if statement to judge the specific input results of the three elements, and cut out different skills according to the different results (for simplicity, directly use letters instead of skills EEE, wee, WWE, WWW, Qee, qwe, qww, QQW, QQE, qqq)

In this way, Carl's skill program has been simply compiled. It's a clich é. There are still many places to modify and improve the program. I will learn and improve the program again and again. Interested students can study together and innovate the casting process of new hero skills!

The most gorgeous skill (example explanation) of developing dota heroes with Java is all the content shared by Xiaobian. I hope it can give you a reference and support more programming skills.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>