Git Product home page Git Product logo

waitcode's Introduction

Wait code

Wait for a queue of keys to be pressed (like the cheat codes)

Documentation

Quick Start

from waitcode import waitcode

waiting = waitcode('hesoyam')
while True:
  waiting.wait()
  print('+100')

With table

from waitcode import waitcode
while True:
  try:
    from rich.console import Console
    from rich.table import Table
    break
  except:
    import pip
    def install(package):
        if hasattr(pip, 'main'):
            pip.main(['install', package])
        else:
            pip._internal.main(['install', package])
    install('rich')
console = Console()
def stats():
  table = Table()
  table.add_column("Money")
  table.add_column("Health")
  table.add_row(f"{money}$", f"{health}/100")
  console.clear()
  console.print(table)
money = 0
health = 1
stats()

waiting = waitcode('hesoyam')
while 1:
  waiting.wait()
  health = 100
  money += 1000
  stats()

waitcode's People

Contributors

themixray avatar

Watchers

 avatar

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.