0.1
Projekt3D4G.py — text/python-source, 1 KB
Dateiinhalt
from visual import * from random import random scene.width=600 scene.height=600 scene.title="3D 4 in a row" #Matrix #for i in range(4): # for j in range(4): # for k in range(4): # 3dmatrix = [[[e1,e2,e3],[e3,e4,e5] ], #zellex = 3dmatrix[0][3][1] matrix = [[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]], [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]], [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]], [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]] x=matrix[0][0][0] print x for i in range(4): for j in range(4): for k in range(4): box(pos=(i,j,k),opacity=0.9) while True: rate(50) if scene.mouse.events: sme=scene.mouse.getevent() if sme.press and sme.pick==matrix[0][x][y]: print "hurra"