Skip to content

Latest commit

 

History

History
29 lines (28 loc) · 1.2 KB

consider.md

File metadata and controls

29 lines (28 loc) · 1.2 KB

Things to consider

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