Classic Tankedaizhan reproduction (a)

Students ever since the epidemic holiday day and wrong, morning sleep until eleven points, eight in the morning to get up class network so the phone open sign open the way to the teacher's screen sharing pages, voice to minimum, a cell phone throw went to sleep, crazy roommate @ sign up to find that the sign has expired regret later get up, get up tomorrow at eight lectures, however. . . No, but the next day still.

  总之这是个悲伤的故事

To get out of this boring life (I can still feel a little stronger at least be able to lie in bed with his eyes open lectures) simply decided to write aBattle CityHoliday project about fulfilling life.

Today is the first day I hope that we supervise, to remind me of a comment in this blog every day, can not comment on the point of a praise it (funny)

A first for their own goals

Battle City game we all played, I remember I was a child in the home have a card to play on game consoles, and game consoles that only two handles, two people can play, still very nostalgic. My ultimate goal is to be able to carry out a complete line of players to play against the version currently in my possession network programming technology is not mature enough to support me accomplish this goal, so I had to learn as to complete the project, which I was a challenge.

The final effect is similar to the following figure

(which I just find from the Internet to map the final results to physical map)

Second, the first day of project completion

The main completed

  1. Frame background to build
  2. Setting the direction of the tank
  3. Movement direction of the tank
  4. Single bullet shot
    Here Insert Picture Description
    UML diagram is this

Third, the question of the day

  1. At first thought was defined figures represent the direction of public static final int type, but think carefully, very wrong, it should be enum class should define the direction, and this is their own school too rigid can not learn and use.
  2. And then how to design a tangle for a long way on the movement of tanks, click the button to go some distance still to go in the tank has been used only player to control the direction and finally came to understand, the simpler the better, and this proves their ability to analyze problems or the lack of
  3. Throughout the process of improving the code of java awt and Swing programmatically I have still not fully grasp, for use with the event listener is not very skilled, but also to continue to strengthen the follow-up.

to sum up

The idea of ​​the project want to do is good, the reality is cruel, programming is no short cut to success is to be hands-on everything, continue to fuel tomorrow, question the idea of ​​continuous improvement and constantly continue.Recalling the old knowledge to learn new knowledge is the truth ah

Project completion I will faithfully upload, update to see what I have time to write a blog (in fact, is their lazy) for a day more, persevering, Orie to! !
Here Insert Picture Description

Published 19 original articles · won praise 9 · views 4525

Guess you like

Origin blog.csdn.net/qq_43777627/article/details/105314183