ucsb-cs56-projects / cs56-games-battleship

-
1 stars 12 forks source link

Code refactoring #61

Closed ktan97 closed 6 years ago

ktan97 commented 6 years ago

Improved as much code as possible without breaking anything for BattleshipGUI, GameGrid and GuessGenerator, reducing the lines of code and getting rid of duplicate code in GuessGenerator.

62

https://gyazo.com/d8f87029c048af4f2587a1dd8c4c748e

BattleshipGUI and GameGrid - reduced overall lines of code

GuessGenerator - got rid of redundant code by making a new method; combined 2 if statements into one