mayureshgadekar / Match3

0 stars 0 forks source link

Flexible architecture #3

Open murtraja opened 6 years ago

murtraja commented 6 years ago

Hello, I see a lot of hardcoded variables in the code. While coding, try to make the system in such a way that it is easily adaptive to change. For an example, can you design the architecture in such a way that by just changing one variable, the match3 game turns into match4 game?

mayureshgadekar commented 6 years ago

Yeah, the variables are hardcoded because I was specifically going for a match3 game. I will definitely make a certain amount of changes so that the match3 will get converted to match4.

murtraja commented 6 years ago

I believe you are taking my words literally, the intention was to code in such a way that things are general so that it is adaptive to change. And even if you have to hardcode, just do it once so that later when you need to change the value, it needs to be updated only once. The point is to write robust code which can handle change