Open PCRedHot opened 1 year ago
Actually, you have been hard coding all the way, for example https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L453
For another developer, s/he would have no idea what conditionButton[10]
refers to. Why are we checking this Button at index 10?
The improvement to this depends very much on the structure of the game, so i cannot give a improvement right away
https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L411-L418
Ok, a few problems here.
Where do 9 and 11 come from? It appears to me the role of the buttons are not the same, which I would separate them in different variables. 9 and 11 here are known as hard coding (not generalised).
Hard coding problem also found here https://github.com/saraaaaras/Redo-YYY-New/blob/7d2da933fc6a144d62eb12a0f94cc54c3e474cad/Assets/Inport/script/GameEngine.cs#L425-L439 6 should be the number of dice, don't you have the variable for that?