Skip to content

its-bhavya/CloudCast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 

Repository files navigation

Cloudcast

Introduction

Cloudcast is a text-based game built on Python and MySQL, designed to promote education in data structures and algorithms. The game challenges players to match predicted weather statistics with actual recorded values using well-defined operations.

The project is modularized into four subdivisions:

  1. TUI - Text User Interface
  2. Generator - To create and populate datasets
  3. Judge - For scoring
  4. Toolkit - For backend connectivity and helper functions

Objective

The primary goal of Cloudcast is to engage users in a fun and educational experience, fostering an understanding of data structures and algorithms.

Players strive to optimize their scores through basic algorithmic knowledge, making the game suitable for enthusiasts interested in text-based gaming.

Future upgrades may expand the audience through:
  • GUI implementation
  • Additional themes
  • Enhanced dataset generation

Specifications

  • Built on: Python 3.9 IDLE and MySQL 8.0
  • Platform: Compatible with all platforms supporting Python 3.7+ and MySQL 8.0
  • Features: Progress saving, dynamic game-state tracking, and real-time weather-inspired datasets
  • Requirements: Python 3.7+, MySQL 8.0 (server only), and internet connection for API calls

Layout

  1. main.py
    • Main driver program and Text User Interface
    • Calls functions from other modules
  2. toolkit.py
    • Helper functions for main and scoring
    • Python-MySQL connectivity
    • Functions Definitions
      • toolkit.update(week, day, stat, val):
          updates data at specified cell to ‘val’
      • toolkit.display(week, day=0, stat=0):
          displays the tables in a tabular format
      • toolkit.exit(maxdiff=0, scoreslate=0, offset=0, moves=0,save=False):
          saves the game if requested and cleans up the environment
      • toolkit.load():
          returns game save variables, or -1 if save file not found
      • toolkit.get_tables():
          returns entire datasets
      • toolkit.get_val(week, day, stat):
          returns predicted_value and recorded_value
      • toolkit.Connect(pwd):
          establishes connection with database, with password as ‘pwd’
  3. scoring.py
    • Evaluates optimization scores
    • Initializes judge variables and calculates scores based on player performance
  4. gen.py
    • Creates and populates datasets with randomized values from real-time API calls
    • Handles dataset generation in the MySQL database

How to Use

  • Ensure Python 3.7+ and MySQL 8.0 are installed.
  • Connect to the internet for API calls when starting a new game.
  • Run main.py to launch the game.
  • Follow on-screen instructions to play and save progress.

Future Upgrades

  • Implementation of a GUI for a more user-friendly experience
  • Addition of diverse themes to the weather system
  • Increased user options for versatility
  • Enhancement of the random dataset generator

Contribution and Feedback

This version of Cloudcast is a well-developed prototype.

Contributions, feedback, and evaluations from experts and critics are welcome.

Monetization is not currently viable within the project's scope.

At the end of the day, Cloudcast aims to spark interest in the field of data structures and computing algorithms among its players.

About

A text-based game running on Python and MySQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages