*/
int dropDisc(Player player, int colIdx) {
if (player == null) {
String message = "Null is not a valid player";
log.error(message);
throw new ConnectFourException(message);
}
if (player == EMPTY_PLAYER) {
String message = "Empty player not allowed to play";
log.error(message);
throw new ConnectFourException(message);
}
// isColumnFull() also perform checkColIdx() no need to to it twice.
if (isColumnFull(colIdx)) {
String message = "Column is full";
log.error(message);
throw new ConnectFourException(message);
}
int rowIdx = getHeight() - 1;
while ((rowIdx > 0) && (getCellFast(colIdx, rowIdx - 1) == null)) {
rowIdx--;