Some edit: still has problems with flushing stdin and detecting basketball players