{"push_id":920536800,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"f33764e630079f211f1aa9981c6432e787a335b9","before":"b26fc976076ad1a7fa6fbcd544fc7a4199040aff","commits":[{"sha":"f33764e630079f211f1aa9981c6432e787a335b9","author":{"email":"02c060ed89e828a0a66ad2bbc210098443a59cef@gmail.com","name":"rainybreeze777"},"message":"Enable switch back to CancelTile state if battle is unresolved\n\nIn the process of implementing this feature, many flaws with the current\nsystem has been exposed\n\n1. A lot of tight coupling between controllers have been introduced. For\ninstance, BattleController hard-references GameController to tell\nGameController to change states when battle finishes. This is a stupid\ndesign choice, and should be avoided at all costs. But for now, due to\ntime concerns, there are no time to introduce major refactors of\nstructures, so for now it will remain like this.\nPossible solutions:\n - Use StrangeIoC, the framework introduces the possibility of using\n   Dependency Injection and Signal&Slots, which eliminates hard coupling.\n\n2. Getting references to other objects are becoming a major problem.\nCurrently there are two naive approaches in Unity:\n i.\tUse GameObject.Find(GameObjectName).GetComponent<scriptName>();\n ii.\tUse Drag & drop feature of Unity\nThe Find method is extremely costly, therefore not recommended. The drag\nand drop approach is too delicate, as anyone in the UnityEditor can modify\nthat, and it shouldn't be this way. Both method creates tight coupling and\nspaghetti code.\n\n3. Now I am debating on whether I should really have Board, BoardDisplay\nand BoardController. A lot of resetting board code are crude, I have not\nyet looked into possible side effects. At time of writing those code, no\neffort has been made to accommodate for resetting board.\n\nAt this point, it is safe to conclude that this project currently has a\nvery bad architecture. When time permits, a thorough investigation and\nrefactor to use DI, Signal & Slot method is strongly advised.","distinct":true,"url":"https://api.github.com/repos/rainybreeze777/PictureMatching/commits/f33764e630079f211f1aa9981c6432e787a335b9"}]}