GithubHelp home page GithubHelp logo

apawate / python3-set-game-2021 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 179 KB

For Computer Programming class at LHS, specifically the final Python assignment before we transition into Java. @psmaker is our teacher :)

Python 100.00%

python3-set-game-2021's Introduction

Python3-Set-Game-2021

[Written by Agastya Pawate]

This is the final Python project for my Computer Programming class in Lynbrook High School. Co-authored with Advaita Guruprasad, who is my partner on the project.


How to play it

The program will ask you

Do you want to play in realtime? (y/n)

If you type y, then it will continue into realtime mode. If you type n, it will launch the basic mode.

Basic mode

The basic mode is a single-player, text-based version of the game which satisfies all the baseline requirements I had in my assignment. It also has a few cheat codes which I leave the user to figure out. (Please don't look in the code...)

  • size will print the size of the deck. This was used primarily for debugging.
  • score will print the current player's score.
  • *cheat code 1* will switch the deck to something super-easy that has sets everywhere.
  • *cheat code 2* will remove all the current cards you have (all the up cards). This helps finish off the game quicker.
  • *cheat code 3* is the coolest. It will tell you if there are any sets in the up cards, and, if so, one of the sets as well.

Note: All basic mode features are in the RealTime mode as well.

RealTime mode

RealTime mode is a multiplayer, realtime text-based version of the game. There is one bug, the nightmare bug, which still appears from time to time and may result in the duplication of cards, but I have reduced its occurrences and hopefully it'll be completely vanquished soon.

Here is a rough execution outline of RealTime mode.

  1. The program will install tqdm (@tqdm), which is a helpful progress bar library for Python.
  2. The program will run write.py, which writes the deck to the server.
  3. The program will get the upCards from the server and do the rest of the routines basically the same as in basic mode.

Important things to note

  • If the program says "Too late!", it means someone else got the set. :(
  • I haven't thoroughly tested the endgame for RealTime mode yet, so it might crash the program.
  • RealTime mode won't run unless I enable the server on my end. Please tell me if you need it enabled via an issue.

python3-set-game-2021's People

Contributors

apawate avatar anish-lakkapragada avatar

Stargazers

 avatar

Watchers

 avatar

python3-set-game-2021's Issues

The nightmare bug...

This is the nightmare bug, which was there from the moment I started
coding the realtime mode.
The nightmare bug is a result of improper syncing between the decks of
the players. When playing in realtime, some decks don't get the upCards
removed from them (which is essential to prevent duplicates). The
nightmare bug keeps popping up over and over again whenever I played in
realtime.
Nope, it doesn't work. The nightmare bug lives on, however beat up it
may be. This will be a long and tiring war.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.