void SwitchDirection(string other_tag) { if (other_tag == "BlackCircleTool") { if (self_tag == "blackball") { direction = "down"; } } else if (other_tag == "WhiteCircleTool") { if (self_tag == "whiteball") { direction = "down"; } } else if (other_tag == "WhiteTriangleTool") { if (self_tag == "blackball") { direction = "upright"; } else { direction = "downleft"; } } else if (other_tag == "BlackTriangleTool") { if (self_tag == "blackball") { direction = "downright"; } else { direction = "upleft"; } } else if (other_tag == "WhiteSquareTool") { if (self_tag == "blackball") { direction = "right"; } else { direction = "left"; } } else if (other_tag == "BlackSquareTool") { if (self_tag == "blackball") { direction = "left"; } else { direction = "right"; } } else if (other_tag == "XTile") { keepMoving = false; gameController.DisplayNotification_FailedAttempt(); gameController.phase += 1; gameController.completedcurrentphase = true; if (gameController.phase == 2) { gameController.target = 29; gameController.currenttargettile = gameController.pL[1]; gameController.currenttargettool = gameController.newTagList[1]; } else if (gameController.phase == 3) { gameController.target = 27; gameController.currenttargettile = gameController.pL[2]; gameController.currenttargettool = gameController.newTagList[2]; } } else if (other_tag == "CheckTile") { keepMoving = false; gameController.CheckWinCondition(); } }