@Override
	public void tick(int verb) {

		brainActive = brainButton.isSelected();
		if (verb == DOWN && brainActive) {
			boolean changed = currentCount != count;
			if(changed) {
				currentCount = count;
				if (currentPiece != null) {
					board.undo();
					currentMove = brain.bestMove(board, currentPiece, HEIGHT, currentMove);
				}
			}
			// take an opportunity to move by the brain when verb is DOWN.
			if (currentMove != null) {
				if (!currentPiece.equals(currentMove.piece)) {
					// rotate
					super.tick(ROTATE);
				}
				// shift left
				if (currentX > currentMove.x) {
					super.tick(LEFT);
				} else if (currentX < currentMove.x) {
					super.tick(RIGHT);
				} else {
				}
			}
		} 
		super.tick(verb);

	}