SmartInvs icon indicating copy to clipboard operation
SmartInvs copied to clipboard

Confusing method name `fillRect()`

Open wysohn opened this issue 4 years ago • 1 comments

When I see the fillRect() method, I assumed it would fill the entire region from pos1 to pos2, yet in the code, it covers only the boundary of the rectangle.

Javadocs also says Fills a rectangle inside the inventory using the given positions. yet it's not really true as items will not be 'filled' inside the rectangle except for the boundaries.

In fact, fillBorders() method merely calls fillRect() using the position from 0,0 to row-1,col-1, so they are essentially the same method.

is it intended behavior?

wysohn avatar Aug 09 '20 02:08 wysohn

Yeah I guess we need to rename these methods and add new methods to make a non-hollow rectangle

MinusKube avatar Aug 09 '20 03:08 MinusKube