Fix build for linux.
Open Tournament with doubleclick
Refactoring some loops