Skip to content

Fixing Known Bugs in Dots And Boxes Game.

Known Bugs:

  1. The code for checking if a square is complete is wrong. It always returns true, whereas it should test if the lines surrounding the square have been "drawn."

  2. The grid doesn't complain if you "draw" a line that has already been drawn. It should throw an IllegalStateException.

Steps to Reproduce:

[Add any relevant steps or context that can help the reviewer understand how to reproduce the bugs.]

Expected Behavior:

[Explain what the expected behavior should be for each bug.]

Actual Behavior:

[Explain what the current incorrect behavior is for each bug.]

Possible Solution:

[Optional: If you have any initial thoughts on how to fix the bugs, you can provide them here.]