add test
This commit is contained in:
		
							
								
								
									
										15
									
								
								test.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								test.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
 | 
			
		||||
from TetrArcade import TetrArcade, tetrislogic
 | 
			
		||||
 | 
			
		||||
game = TetrArcade()
 | 
			
		||||
game.new_game()
 | 
			
		||||
game.move_left()
 | 
			
		||||
game.move_right()
 | 
			
		||||
game.rotate_clockwise()
 | 
			
		||||
game.rotate_counter()
 | 
			
		||||
for i in range(12):
 | 
			
		||||
    game.soft_drop()
 | 
			
		||||
game.on_draw()
 | 
			
		||||
while game.state != tetrislogic.State.OVER:
 | 
			
		||||
    game.hard_drop()
 | 
			
		||||
		Reference in New Issue
	
	Block a user