Skip to content

Commit

Permalink
added changes on animations/r0ket
Browse files Browse the repository at this point in the history
  • Loading branch information
saerdnaer committed Nov 5, 2016
1 parent 230b073 commit c111147
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions animations/r0ket/acabsl.py
19 changes: 10 additions & 9 deletions animations/r0ket/memory2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import acabsl
import pygame
import r0ket_input
#import r0ket_input
from pygame.locals import *
from threading import Thread
from random import randint
Expand All @@ -20,11 +20,12 @@
covered = (33,33,33)
background = (0,0,0)
defaulthidecolor = background
defaultuncover = (0,0,255)
marked = (44,44,44)
defaultuncover = (0,255,0)
marked = (0,0,255)

def send(pos,rgb,fadet=0):
acabsl.send(pos[0],pos[1],*rgb,t=fadet)
acabsl.update()

def reset():
acabsl.update()
Expand Down Expand Up @@ -190,7 +191,7 @@ def generateMemory(self):
self.matrix[i][j].covered = False

def move(self,direction):
self.changePosition(*{"up":(0,-1),"down":(0,1),"left":(-1,0),"right":(1,0)}[direction])
self.changePosition(*{"up":(0,1),"down":(0,-1),"left":(-1,0),"right":(1,0)}[direction])

def changePosition(self,x=0,y=0):
self.setPosition([(self.marked[0]+x)%self.virtualWidth,(self.marked[1]+y)%self.virtualHeight])
Expand Down Expand Up @@ -346,9 +347,9 @@ def loadAnimation(self):
advancedMemoryField = [AdvancedMemoryField,[],True]
simpleAnimationField = [SimpleAnimationField,[],False]
#handler = Handler(1,width/4,height,[[SimpleMemoryField,[],True]],2)
handler = Handler(2,width/4,height,[simpleMemoryField,advancedMemoryField],2)
#handler = Handler(1,width/8,height,[simpleAnimationField],2)
#handler = Handler(1,width/4,height,[advancedMemoryField],2)
handler = Handler(2,width,height,[simpleMemoryField,advancedMemoryField],2)
#handler = Handler(1,width/2,height,[simpleAnimationField],2)
#handler = Handler(1,width/2,height,[advancedMemoryField],2)
handler.initiate()
#pygameInputHandler(handler)
r0ket_input.RoketInput(handler)
pygameInputHandler(handler)
#r0ket_input.RoketInput(handler)

0 comments on commit c111147

Please sign in to comment.