Unit placement and board traversal function