Tournament generator written in java