ROBIN.BAS February 2001 by Marc Kummel aka Treebeard. Contact mkummel@rain.org, http://www.rain.org/~mkummel/ What is ROBIN.BAS? -------------------- ROBIN is a small BASIC program I wrote to create round robin schedules, eg for sports tournaments. It is a straight forward implementation of the "polygon algorithm": Line up the contestants facing each other. If there's an odd number of teams, just add a dummy team to get to an even number and consider it a "bye". Whoever faces the imaginary "bye" team sits out that round. With eight teams, it looks like this, same as above: 1 2 3 4 *8* 7 6 5 For each successive round, one team stays fixed (say team *8* in this example), and the others move to the next place clockwise: 7 1 2 3 6 7 1 2 5 6 7 1 *8* 6 5 4 *8* 5 4 3 *8* 4 3 2 4 5 6 7 3 4 5 6 2 3 4 5 *8* 3 2 1 *8* 2 1 7 *8* 1 7 6 After these seven steps, everyone is back to where they started, and we're done. With even n or odd n-1 teams, we're done after n-1 rotations. For more info and links on round robin scheduling, check out my Round Robin stumper (19 Feb 2001) on my Stumper Web page: . Using BIGFAC.BAS ----------------- ROBIN is a simple DOS program. Run it in DOS, or a Command session in Windows. It asks you to enter a number of teams. Just press return to exit. It also asks if you want to save the results to the comma- delineated text file ROBNDAT.TXT, which can then be imported into a spreadsheet like Excel. The Files: ----------- I wrote this program to solve a stumper. You'll have to study the source code for more info. I wrote it using MS Basic PDS v7.10, but it should work with any version of QBasic, QuickBasic, or PDF. ROBIN.EXE DOS executible to partition a number ROBIN.BAS BASIC source code README.TXT This file TBVAULT.TXT Treebeard's Basic Vault info Conditions: ------------ This program and source code are yours to use and modify as you will, but they are offered as freeware with no warranty whatsoever. Give me credit, but do not distribute any changes under my name, or attribute such changes to me in any way. You're on your own! If you find this program or code useful, then let me know what you do with it, as a courtesy to a fellow programmer who still hacks for fun and glory. Any suggestions or comments will be much appreciated. Send comments and fixes to: Marc Kummel aka Treebeard mkummel@rain.org http://www.rain.org/~mkummel/ http://www.treebeard.org/ For more interesting Basic software with source code, check out Treebeard's Basic Vault at .