Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: My own Lan system
Post: RE: My own Lan system

Thanks you for your answer.
Phidias618 Code Review 2 1,236 May-26-2023, 07:24 PM
    Thread: My own Lan system
Post: My own Lan system

Hey, I recently create a game, who need a comunication between 2 player and I came out with this, I just wan't to know if this code is not too terrible. import socket class LanBrick: __slots__ = ...
Phidias618 Code Review 2 1,236 May-23-2023, 03:58 PM
    Thread: Problem with colorkey
Post: RE: Problem with colorkey

The Sprite class is just a class that i created to store all the sprite of my game it just store a dict that contain sprite name and Sprite and some classmethod to get a part of a sprite loaded in Spr...
Phidias618 Game Development 4 1,892 May-15-2023, 06:14 PM
    Thread: Surface and rectangle in pygame
Post: RE: Surface and rectangle in pygame

I have a question, why did you use property for target, if you rename self._target to self.target and delete the 2 property that would achieve the same?
Phidias618 Game Development 6 2,375 May-15-2023, 07:34 AM
    Thread: Surface and rectangle in pygame
Post: RE: Surface and rectangle in pygame

I don't understand very well the question, but if you want to draw a rectangle on the screen you can just use this simple program import pygame as py screen: py.Surface = py.display.set_mode((700, 700...
Phidias618 Game Development 6 2,375 May-14-2023, 07:29 PM
    Thread: Problem with colorkey
Post: Problem with colorkey

Hello, in one of my project I encounter a problem with pygame.set_colorkey, I have a code like this, where Sprite is just a class to load and get Sprite The problem is that even if the color of the ba...
Phidias618 Game Development 4 1,892 May-14-2023, 08:27 AM
    Thread: variable not defined inside a list comprehension
Post: variable not defined inside a list comprehension

Hello, in a program i have a class like this one but when in run the code i get that x is not defined, is this problem relative to list comprehension? class MyClass: x = 8 y = 9 grid = [[0...
Phidias618 News and Discussions 1 2,013 May-13-2023, 08:47 PM
    Thread: Why there is not __break__ dunder method
Post: RE: Why there is not __break__ dunder method

Thanks you
Phidias618 News and Discussions 4 1,004 May-13-2023, 08:39 PM
    Thread: Why there is not __break__ dunder method
Post: RE: Why there is not __break__ dunder method

class SomeBoard: def __init__(self, width, height): self.width = width self.height = height self.grid = [[0 for _ in range(width)] for _ in range(height)] self._ite...
Phidias618 News and Discussions 4 1,004 May-13-2023, 05:27 PM
    Thread: Why there is not __break__ dunder method
Post: Why there is not __break__ dunder method

Hello, Yesterday I ran into an issue, i try to iterate multiple time trough a custom class, the class is a chess Board and iterating trough it would give a tuple of (x, y, tile) for each step of the l...
Phidias618 News and Discussions 4 1,004 May-13-2023, 02:43 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020