stack_racers's People
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 if given invalid input on which spot to place a player tile
function to place a tile expects an int input. Just need to make sure we're handling inputs when asking for the spot so that only ints are accepted.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.