- reducing loops
- reducing html & JS communication
- store elements somewhere in JS (if required later)
- convert specific idea or code to a function; for later use
- Everything Object Oriented
- clean variable after using (if not needed later)
- run function only if necessary
- like generating new possible moves only if piece's position is changed.
- create function for all css affects while playing
- or, write css code and give class/id to element
- Use whole numbers instead of using row & column
- addition, subtraction, & multiplication will give us desired result
- remove uncessary checkings/conditions
- like checking name/color of pieces while playing
- just store it somewhere
- don't run a function two times in a class
- store result until result is going to be changed
- make something that keep tracks of everything
- and all files could access it easily
- try to convert resused code into function (like in functions.js)
- store everything in variable
- if used single time, do hard coded
- write report about
- how something is implemented?
- why this is done instead of another way?
- problems and fixes