Exemple #1
0
def writeBalloonData(condition, gender, participantID, isTesting):
	print "Writing Balloon data."
	prefix = 'hf-output-balloon-data-' + ('test' if isTesting else 'experiment') + '/'
	path = prefix + createPath(condition, participantID, gender)
	try:
		file = open('C:/' + path, 'a')
	except:
		file = open(path, 'w')
	file.write(BalloonsClasses.reportStats())
	file.close()
Exemple #2
0
def report():
	print(BalloonsClasses.reportStats())
Exemple #3
0
# A file for testing stuff.

from __future__ import print_function # For testing: it replaces the normal 'print' keyward with a print() function.
import viz
import vizshape
import vizact
import BalloonsClasses
import math

viz.go()
viz.clearcolor(viz.SKYBLUE)
BalloonsClasses.initialize()
viz.MainView.setPosition(0, 0, 2)

def report():
	print(BalloonsClasses.reportStats())

#for i in range(100):
#	testPigeon = BalloonsClasses.Pigeon()
#	testPigeon.setEuler(180, 0, 0)
#	testPigeon.plotRandomCourse(5)

hand = viz.addChild('white_ball.wrl')
hand.visible(viz.OFF)
viz.link(viz.MainView, hand, offset=[0, 0, 2])

testDart = BalloonsClasses.Dart()
testDart.attachToHand(hand)
BalloonsClasses.giveHandicap(testDart)

#testBalloon = BalloonsClasses.Balloon()