python-practice-b02-006 / Sea-battle-2

0 stars 0 forks source link

OOP-issue #1

Open notTGY opened 3 years ago

notTGY commented 3 years ago

https://github.com/python-practice-b02-006/Sea-battle-2/blob/5efdf50b58464d6c5a0872869ce5b2930ce076e7/globaldata.py#L9

Not a good approach to the button mechanics. Data should be represented as an object instead of an array. And when importing you may import an object instead of *.

This rule also applies for the following two lines.

https://github.com/python-practice-b02-006/Sea-battle-2/blob/5efdf50b58464d6c5a0872869ce5b2930ce076e7/globaldata.py#L13 https://github.com/python-practice-b02-006/Sea-battle-2/blob/5efdf50b58464d6c5a0872869ce5b2930ce076e7/globaldata.py#L15

Sinitsa-Vasiliy commented 3 years ago

I want all data that can be changed in future to be saved in one place. So even if with classes, then this data will stay here anyway.