Write interesting game of backgammon

I remember many years ago, when just become a programmer, programming is very interested in his spare time and would like to write a little interesting programs using the master programming techniques.

When I had just learned VB language, I could not wait to try to use it to develop a backgammon game, just for fun. What classes, my mind are wondering how to put me backgammon skills "taught" to the program. Beginning just written a backgammon's interface, then provide a function to determine winning or losing, and then the next but also to provide skills in human right.

With this program more and more like spotting game, and it caused me into units of a group of young colleagues of interest. Work free time, and I backgammon game to play against them has become a pastime. More funny it is that these cute and confident colleagues chess success criteria is: to see who win with the shortest round. Since the beginning of the software there are many omissions, so they quickly helped me find some silly Bug. For example, in a line, there have been ten pieces of the same color, the program also indifferent, did not promptly announced that the party had to win. There's a certain routine and colleagues found that in accordance with the procedures under the long walk seven steps will be able to win. Every time when they win, they will leave with a sense of accomplishment filled with joy.

Thanks to these colleagues have taken the trouble to come and procedures for the next, help me find a lot of Bug, and then I worked hard and patiently taught programs, continuous improvement ideas. Later, I put myself under backgammon routines all taught this program, so I at the time and it always neck and neck. Other colleagues come to the next, it will not easily win the.

Unfortunately, I own backgammon level is at general level. To get my apprentice program can be "out of the blue and green rather than blue", I specifically read some of the backgammon game record book, reproduce buying and learning, hands-on teaching to the program, but later it also improves the skill of a chip. Colleagues then come challenge it, have to go all out, otherwise it will be defeated. Colleagues whim, I let this program and professional backgammon program, the results of this program, although I also support a number of rounds are ultimately defeated. Really Mountains Beyond Mountains, after all, I am not versed in the complex algorithms backgammon, backgammon game thus prepared can only reach this level.

Later, I also wrote a Chinese chess program only provides an interface to support two people on two computers to the next, but to achieve human-computer on, it goes beyond the scope of my abilities. I remember one time in his spare time, a colleague and I are both on the test computer chess program, he led just came over, remind me to work are not allowed to play games, I'm scared to quickly put the game off. In hindsight, if I had to explain and leadership: "I am learning programming techniques, this program is my masterpiece," I do not know if he would be so studious employees satisfied with it?

He said programming is very tedious boring, then occasionally write some of their favorite small software, which is bitter to do music embellishment.

Guess you like

Origin blog.51cto.com/sunweiqin/2405984