preventing overwriting a square, handling ties