Update instructions

This commit is contained in:
Aaron Fenyes 2019-09-29 03:40:43 +02:00
parent 0ac76265a0
commit b11420daab

View File

@ -184,21 +184,22 @@ def handle_wave_events():
quit()
def show_data(screen):
energy = 0.5*(sum(q*q for q in charge) + inductance*sum(i*i for i in current))
energy = sum(temp)
text = font.render('energy', True, (255, 255, 255))
screen.blit(text, (20, viewsize))
text = font.render(str(energy), True, (255, 255, 255))
screen.blit(text, (120, viewsize))
text = font.render('charge[0]', True, (255, 255, 255))
text = font.render('temp[0]', True, (255, 255, 255))
screen.blit(text, (20, 30 + viewsize))
text = font.render(str(charge[0]), True, (255, 255, 255))
text = font.render(str(temp[0]), True, (255, 255, 255))
screen.blit(text, (120, 30 + viewsize))
if __name__ == '__main__':
# set up background
background = pygame.Surface(screen.get_size()).convert()
background.fill((32, 32, 32))
text = font.render('press [j] or [k] to pluck', True, (255, 255, 255))
##text = font.render('press [j] or [k] to pluck', True, (255, 255, 255))
text = font.render('press [j] to pluck', True, (255, 255, 255))
background.blit(text, (340, viewsize))
text = font.render('hold [space] to drain', True, (255, 255, 255))
background.blit(text, (340, 30 + viewsize))