In ConnectX.cpp, the ConnectX::inBounds function will return true even if the width is -ve( and out of bounds).
It should check for both height and width together and then send the result.
This results in the ConnectX::at() function failing to return correct output as well.
Testcases :
checkOutofBounds
checkShowBoard
In the placePiece() function, the column parameter should be checked if its less than 0 or outofbounds.
Testcases :
checkoutofPlacePiece
In the placePiece() function, toggleTurn() is called outside the if condition. It should be called within the if condition , just before break.
In the placePiece() function, at() tries to return a value of a location which doesn't exist. This is not handled correctly in inBounds(), which causes a coredump when value returned by at() is compared with EMPTY.
Testcases:
checkoutofPlacePiece
checkPlayerTurn