Giter Site home page Giter Site logo

aatend2.0's People

Contributors

badgeminer avatar

Watchers

 avatar

aatend2.0's Issues

test

import pygame,sys,random

pygame.init()
scr = pygame.display.set_mode((500,500))
z = 250

s={
"c":[0],
"d":[15],
"a":[-5]
}
st = {
"c":0,
"d":1,
"a":-1
}
dc = 0
c = pygame.time.Clock()
def col(i,oi):
if i > 0:
if i > oi: return (0,255,0)
return (255,0,0)
if i > oi: return (0,150,0)
return (150,0,0)

while True:
dc += c.tick(20)
scr.fill("black")
pygame.draw.line(scr,"white",(0,z),(500,z),1)
for e in pygame.event.get():
if e.type == pygame.QUIT:
sys.exit()

for k,v in s.items():
    I = 0
    pi = 0
    for i in v[-50:]:
        pygame.draw.line(scr,col(i,pi),(I-10,z-pi),(I,z-i),3)
        I += 10
        pi = i
    if round(dc) % 15:
        V = random.randint(-75,75)/10
        s[k].append(pi+(V)+st[k])
        st[k] += V/10

pygame.display.flip()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.