Start working on engine
							parent
							
								
									c8ad44e93e
								
							
						
					
					
						commit
						70456794a4
					
				
							
								
								
									
										65
									
								
								lambdaV.py
								
								
								
								
							
							
						
						
									
										65
									
								
								lambdaV.py
								
								
								
								
							|  | @ -17,24 +17,32 @@ | ||||||
| 
 | 
 | ||||||
| import re | import re | ||||||
| 
 | 
 | ||||||
| debug_mode = True | debug_mode = False | ||||||
| 
 | 
 | ||||||
| cursor_up    = 'Λ' | def debug_message(text): | ||||||
| cursor_down  = 'V' |     if debug_mode: | ||||||
| cursor_left  = '<' |         print("DEBUG: ", end="") | ||||||
| cursor_right = '>' |         print(text) | ||||||
| 
 | 
 | ||||||
| empty_field = [ | 
 | ||||||
|     " ________________ ", | cursor_north = 'Λ' | ||||||
|     "|                |", | cursor_south = 'V' | ||||||
|     "|                |", | cursor_west  = '<' | ||||||
|     "|                |", | cursor_east  = '>' | ||||||
|     "|                |", | 
 | ||||||
|     "|                |", | cursor_current = ' ' | ||||||
|     "|                |", | 
 | ||||||
|     "|                |", | field = [ | ||||||
|     "|                |", |     " _________________ ", | ||||||
|     " ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ " |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     "|                 |", | ||||||
|  |     " ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ " | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
| wall  = '#' | wall  = '#' | ||||||
|  | @ -43,11 +51,28 @@ goal  = '$' | ||||||
| 
 | 
 | ||||||
| cursor_position = [0, 0] | cursor_position = [0, 0] | ||||||
| 
 | 
 | ||||||
|  | def clear_field(): | ||||||
|  |     field = [ | ||||||
|  |         " _________________ ", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         "|                 |", | ||||||
|  |         " ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ " | ||||||
|  |     ] | ||||||
| 
 | 
 | ||||||
| def debug_message(text): | def draw_field(): | ||||||
|     if debug_mode: |     for row in range(len(field)): | ||||||
|         print("DEBUG: ", end="") |         for column in range(len(field[row])): | ||||||
|         print(text) |             if column==cursor_position[0] and row==cursor_position[1]: | ||||||
|  |                 print(cursor_current, end="") | ||||||
|  |             else: | ||||||
|  |                 print(field[row][column], end="") | ||||||
|  |         print("") | ||||||
| 
 | 
 | ||||||
| def condition_in_front_of_wall(inverted): | def condition_in_front_of_wall(inverted): | ||||||
|     return False |     return False | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 BodgeMaster
						BodgeMaster