[+] Add velocity
This commit is contained in:
+6
-4
@@ -29,9 +29,11 @@ COLORS = {RGB.from_hex(v) for v in {
|
|||||||
|
|
||||||
|
|
||||||
# Snow fall data structure
|
# Snow fall data structure
|
||||||
class Snow(NamedTuple):
|
class SnowParticle(NamedTuple):
|
||||||
x: int
|
x: int # x position
|
||||||
y: int
|
y: int # y position
|
||||||
|
xv: int # x velocity
|
||||||
|
yv: int # y velocity
|
||||||
color: RGB
|
color: RGB
|
||||||
|
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ async def shell(reader: TelnetReaderUnicode, writer: TelnetWriterUnicode):
|
|||||||
width: int
|
width: int
|
||||||
x: int
|
x: int
|
||||||
y: int
|
y: int
|
||||||
snow: list[Snow]
|
snow: list[SnowParticle]
|
||||||
|
|
||||||
# Get the size of the terminal
|
# Get the size of the terminal
|
||||||
async def get_size() -> tuple[int, int]:
|
async def get_size() -> tuple[int, int]:
|
||||||
|
|||||||
Reference in New Issue
Block a user