Giter VIP home page Giter VIP logo

stack_racers's People

Contributors

taylormitchell20 avatar

Watchers

 avatar

stack_racers's Issues

If a valid input isn't entered during turn, player forfeits turn

if no input or an invalid input is entered, game currently moves onto next players turn instead of giving current player another chance. Should be fixed by moving the next_player() call to the end of each possible move method. That way cycling through the turn loop again after bad input starts over but doesn't change players.

Game crashes after giving any invalid responses in turn loop

For example if you try to bet on a racer that doesn't exist, if you try to place a bet on a racer with no bets left to take, or you make a prediction on a racer you've already predicted (no longer in your player.predictions list).

The warning will come up and the turn loop will restart successfully. But as soon as you submit your first response the second time around, the first input is passed to the corresponding methods which throws an error.

I'm pretty sure it has something to do with variable scope/lifecycle/recursion messiness as I'm re-calling the leg() function from inside itself. But I just can't figure out what exactly is going on. I've tried to brute force it by instantiating all variables that get passed as empty first. Hoping that the second time through the leg() function it'll clear out any previously set bad inputs. No luck.

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.