Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Splendor Recreation

Welcome to my recreation of the board game Splendor in Python!

How to Play

  • Download the repo onto your local computer.
  • Python 3.10 or later is needed to run the repo, so download if you don't have it.
  • in the repo's root directory start the game with "python3 play_splendor.py"
  • The game will start with it's interactive GUI and guide you through playing the game
  • At the end of each round you will have the opportunity to save the game for a later time.
  • Enjoy!

Overview

This project is a chance to demonstrate my python skills, practice making games, and potentially add some analysis of the game and computer players at a later date.

The project is fully functional, allowing players to progress from the start of the game to the end as intended with the exception of a few edge cases such as the inability to buy using jokers.

Players can save their game state to a JSON file at the end of each round and resume from where they left off in the next session.

While the game is currently text-based, future enhancements could include a rules explanation at the start of the game, colored fonts for improved readability, and visual enhancements for noble cards.

Development Notes

Future Development Ideas:

  • Add code testing
  • Incorporate a rules explanation at the start of the game.
  • Implement additional error-proofing measures.
  • Improve readability with colored fonts.
  • Display the total number of remaining cards in each level deck.
  • Enable the use of Jokers for purchases.
  • Implement stricter token handling.
  • Enhance code compliance with PEP8 standards.
  • Improve the visual appeal of noble cards.
  • Reduce code redundancy.
  • Develop a bot capable of playing the game based on different strategies

Lessons Learned:

  • How to save and loading data from a JSON file.
  • Managing multiple modules while maintaining data access.
  • Working with standard Python data types and common loops.
  • Practicing version control with Git and GitHub.
  • Handling user interface and input.
  • Adhering to PEP8 coding conventions.
  • Implementing error handling for incorrect user input.
  • Effective use of dictionaries.
  • Leveraging ChatGPT for code development assistance.
  • Understanding the importance of iterative development and code refactoring.
  • Utilizing existing Python modules such as os, copy, random, and json effectively.
  • Overcoming challenges, such as dealing with cls errors and multiline quotes within lists.
  • Exploring creative solutions for text-based game mechanics and interface limitations.
  • Learning to prioritize between immediate fixes and future enhancements.
  • Embracing the need to refactor or remove code when necessary for better solutions.

References

About

A recreation of the board game Splendor in Python

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /