pygame realizes tic tac toe chess - 3 Logical optimization
preface
Let's talk about the goal of this period first. First of all, when we judge the win or loss and draw, there is only one console output, which obviously does not conform to the doge of our game In addition, there is a loophole in the previous logic, that is, the player must be the first player (that is, the first person to play chess, w ...
Posted by wisewood on Fri, 18 Feb 2022 15:47:47 +0100
One hour, one article, one literary meeting, python, and then do a plane war game
Note:
Students who want to study slowly can see mine Introduction to python to game practice column (updating) Students who want to learn C can watch it Dahua series: C language (basically updated) Students who want to learn C + + can watch it Dahua C + + (updating) Those who want to do exercises can see it Detailed explanation of 100 cases of ...
Posted by remmy82 on Fri, 18 Feb 2022 10:09:39 +0100
python implementation 2048 -- 1. Interface & Logic
preface
This time, let's try 2048. Those who don't know can play it by themselves. It won't be launched here. We still use pygame, because we have had several pygame projects before. This time, I'm going to hurry up and mainly talk about the logic part.
Interface construction
The pygame call in this part will pass by. If you don't know the p ...
Posted by Firestorm ZERO on Thu, 17 Feb 2022 15:14:00 +0100
Write a calculator in Python
Source code in python learning exchange q group: 733089476
preface
There are two common computing AIDS. One is the abacus invented by the ancients, and the other is the calculator invented by our modern people. Compared with the abacus, the calculator is better than the abacus in terms of convenience and computing speed. In this paper, we use ...
Posted by Rojay on Wed, 16 Feb 2022 12:06:03 +0100
Automatic implementation of snake eating program in Python
Realization effect Let's see the effect first
It's much faster than my manual game, and it's stand-alone. The automatic game doesn't provoke me to scold. Ha ha, the whole automatic game of multiplayer game will be scolded to death~ code If the software is not installed, install the software first. If the module is not installed, install the p ...
Posted by vbracknell on Tue, 15 Feb 2022 12:47:35 +0100
Childhood classic memories | take you to play a magic tower game in Python from scratch
Relevant documents
Relevant game materials (pictures and audio, etc.) come from the network and are subject to invasion and deletion.
Small partners who need source code can add QQ group: 773162165
development tool
Python version: 3.7.4 Related modules: pygame module; And some python built-in modules.
Environment construction
Install Pyth ...
Posted by GrexP on Wed, 09 Feb 2022 14:43:57 +0100
Bing dwen dwen can't buy it? Teach you to draw one in Python~
Hello, this is yuechuang.
On the two days Bing dwen dwen, the mascot "ice pier pier" was opened up with the opening of the Winter Olympic Games in Beijing. It is said that some people even fried the price to thousands of yuan.
In fact, it's OK. I originally wanted to buy some objects in my new study. I inadvertently thought that I w ...
Posted by xionhack on Wed, 09 Feb 2022 13:00:50 +0100
Python project alien invasion: Aliens
Python project alien invasion (II): Aliens
In this chapter, we mainly complete the following functions. First, add an alien at the edge of the screen, and then try to generate a group of aliens. We make these aliens move like two hundred years and below, and delete the aliens hit by the bullet. Finally, we show the number of ships the play ...
Posted by Sgarissta on Tue, 08 Feb 2022 13:44:58 +0100
Pygame simple depth first algorithm generates maze
Before learning path calculation, we need a scene. We checked the maze generation method online and spent some time writing a simple maze generator The basic principle is very simple: The 2-dimensional matrix is used to represent the maze. Each node has four walls. The depth search is used to move in four directions randomly. If the node is rea ...
Posted by JADASDesigner on Sun, 06 Feb 2022 21:22:56 +0100
pygame write basketball game - match man dribble to avoid defense and jump to shoot
There are many basketball games on the Internet. Here we use pygame to write one. There is a shooter and a defender in the game. The shooter dribbled the ball to avoid defense, jumped up and shot, and scored a point. The closer the shooter is to the basket, the higher the shooting accuracy, but the closer he is to the basket, the more likely he ...
Posted by someguyhere on Tue, 01 Feb 2022 23:49:18 +0100