Created
June 3, 2020 20:06
-
-
Save alxgrk/1c6fc10eba86e1385eae2a4a042a1759 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
searchResult = searchFor(searchTerm); | |
finished = false; | |
do | |
r = Random(0, 1); | |
if (r <= 0.7) { | |
searchResult.getHit(0).follow(); | |
finished = true; | |
} else if (r <= 0.9) { | |
// there are different categories of results: people, tweets, photos, .. | |
searchResult.changeResultCategory() | |
} else if (r <= 1) { | |
// abort search | |
finished = true; | |
} | |
} while (!finished) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment