Replace the dot cursor after the player moved, not before
This commit is contained in:
		
				
					committed by
					
						
						Nicolas Margulies
					
				
			
			
				
	
			
			
			
						parent
						
							6e544bf02e
						
					
				
				
					commit
					e448697e6b
				
			@@ -24,8 +24,8 @@ def main(stdscr):
 | 
				
			|||||||
    stdscr.refresh()
 | 
					    stdscr.refresh()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for i in range(10) :
 | 
					    for i in range(10) :
 | 
				
			||||||
        stdscr.addstr(cur[0],cur[1],'.')
 | 
					 | 
				
			||||||
        key = stdscr.getkey()
 | 
					        key = stdscr.getkey()
 | 
				
			||||||
 | 
					        stdscr.addstr(cur[0],cur[1],'.')
 | 
				
			||||||
        if key == 'z' :
 | 
					        if key == 'z' :
 | 
				
			||||||
            if cur[0]>0 and M[cur[0]-1][cur[1]] != '#' :
 | 
					            if cur[0]>0 and M[cur[0]-1][cur[1]] != '#' :
 | 
				
			||||||
                cur[0] = cur[0]-1
 | 
					                cur[0] = cur[0]-1
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user