会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132459个问题
JAVA 全系列/第五阶段:JavaWeb开发/Servlet技术详解 9451楼

image.png

Python 全系列/第一阶段:Python入门/序列 9452楼
JAVA 全系列/第一阶段:JAVA 快速入门/JAVA入门和背景知识 9453楼
Python 全系列/第三阶段:Python 网络与并发编程/并发编程 9454楼
Python 全系列/第一阶段:Python入门/编程基本概念 9456楼
Python 全系列/第三阶段:Python 网络与并发编程/并发编程 9458楼
Python 全系列/第三阶段:Python 网络与并发编程/并发编程 9459楼
Python 全系列/第十三阶段:高并发性能怪兽-Tornado 框架/Tornado项目 9460楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/容器 9462楼


下拉列表效果.rar

老师我已经检查好几遍了 为什么效果出不来

WEB前端全系列/第一阶段:HTML5+CSS3模块/浮动与定位 9464楼

'''

load game window

'''


import pygame

# define constants

SCREEN_WIDTH=700

SCREEN_HEIGHT=500

BG_COLOR=pygame.Color(255,255,255)

#from curses import window

class MainGame():

    window=None

    # initialization method

    def __init__(self) -> None:

        pass

    # start game

    def startGame(self):

        #initialize the window

        pygame.display.init()

        #set the size of window

        MainGame.window=pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))

        # set the title of window

        pygame.display.set_caption("tank war1.03")

        while True:

            # set the fill color for the window

            MainGame.window.fill(BG_COLOR)

            pygame.display.update


    # end game

    def endGame(self):

        pass


class Tank():

    def __init__(self) -> None:

        pass

    #defition of show tank

    def displayTank(self):

        pass


    #movement of tank

    def move(self):

        pass


    #shoot

    def shot(self):

        pass



#our tank

class MyTank(Tank):

    #initialization method

    def __init__(self) -> None:

        pass


#enemy tank

class EnemyTank(Tank):

    def __init__(self) -> None:

        pass


# class bullet

class Bullet():

    def __init__(self) -> None:

        pass


    #show bullet

    def displayBullet(self):

        pass


    #move

    def move(self):

        pass


# class wall

class Wall():

    def __init__(self) -> None:

        pass


    # the defition of show wall

    def displayWall(self):

        pass

# class explosion effect

class Explode():

    def __init__(self) -> None:

        pass


    #display the effect of explosion

    def displayExplode(self):

        pass



#class of sound effect

class Music():

    def __init__(self) -> None:

        pass


    #play music

    def playMusic(self):

        pass


# main method

if __name__ =='__main__':

    # call startGame() in the main class

    MainGame().startGame()



为什么我这窗口还是黑色的

image.png


Python 全系列/第二阶段:Python 深入与提高/(旧)坦克大战 9465楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637