1
0

CarcassonneScore.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python
  2. """
  3. Carcassonne score keeping system.
  4. Copyright 2018 George C. Privon
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. """
  16. import argparse
  17. import sys
  18. import cgame
  19. __version__ = "0.4.2"
  20. def getargs():
  21. """
  22. Get command line arguments.
  23. """
  24. parser = argparse.ArgumentParser(description="Carcassonne score keeping \
  25. system.")
  26. parser.add_argument('-c', '--config', default='CarcassonneScore.conf',
  27. help='Location of the configuration file.')
  28. return parser.parse_args()
  29. def main():
  30. """
  31. Main routine
  32. """
  33. args = getargs()
  34. mygame = cgame.cgame(config=args.config)
  35. mygame.runGame()
  36. sys.stdout.write("Thanks for playing!\n\n")
  37. if __name__ == "__main__":
  38. main()