Many students said C Language is difficult to learn , I don't know C What can I do , If embedded device programming is not involved , We can use it to write games ? yes ,C There are many games that language can write , Sokoban , Gobang , wait

Let's talk about it here , I am engaged in embedded programming , Mainly Linux platform , Speaking of Gobang, we must be familiar with it , One of my junior high school classmates is a Gobang master , Few people can beat him , Self number “ Kill in ten steps ”, Far away , Today's article should be my last C Language realizes the game series , During this period, I received many friends' support , I would like to thank you very much , Later, I will mainly write some programs about algorithms , After all, the algorithm is the soul of the program , I hope you will continue to support me

That's the same sentence , program = data structure + algorithm , Before writing code , There must be a basic modeling in the brain , flow chart , Coding implementation , Final tuning . Using the most concise code to realize the function in your heart is a good programmer

No more nonsense , Upper effect :

stay 20x20 On the chessboard , Find a little partner , Let's play Gobang , One party holds the sunspot , One side holds the white son

Enter the position coordinates of the pieces to be placed in turn , To place the pieces

According to the gobang rules , Who is the first to get five in a straight line , Whoever wins chess

This game uses C Language in windows Implemented under , Most of them are standard libraries , No platform dependency , The source code needs only a little modification , You can put it directly Linux Compile and run under , Please refer to the push box for the source code acquisition method

Unconsciously , use C Language wrote a series of games , Look back , The pay during this period is vivid , That's what programmability is , Full of fun , It's like playing , It's fun , Think of a famous saying “ Do what you like , Do what you are good at ”, Everyone can be a good programmer ,
Just Do It!

Technology