like if a list was like {"A","B","C"} how could i choose one at random
mesquite22341: Curly brackets (in python) are for a dictionary, not a list (Lists use [])
2: The random module
import random
list = ['A','B','C'] # Note [] not {}
thing = random.choice(list) # thing can be anything
`3 years ago
hyperupcallhi!
to start off, i would recommend converting your .tff font file into a more web-friendly format such as .woff or woff2 using a conversion tool (i like to use (fontsquirrel)[https://www.fontsquirrel.com/tools/webfont-generator]), although this isn't strictly necessary
after you convert and upload that to your repl, then you can add it to your stylesheet with css. the crucial part being, you use the @font-face at-rule
@font-face {
font-family: 'Baloo Bhai';
src: url('fonts/ba4 years ago
For some reason files are appearing in my game The Inspector.
what the
the last 3 files i did not add. why did these appear and what are they for
Geocube101These are most likely files added by repl.it during initialization of modules
(Kind of like the package.lock file for node.js users)4 years ago
mwilki7why everyone roasting him for saying he saw himself on top contributor page lool4 years ago
amasadAs others said, it's pretty huge. Repl Talk is somewhat new/experimental part of the product that we're still trying to figure out how it fits with the rest of the site.4 years ago
Hi everyone! I made a game. Wait... Nope. this is stil my work in progress! Its not done yet so please don't try it. There are a lot of bugs and I d
Python
aflacSo... 'he' WILL finish the "game" what should the game be?4 years ago
mwilki7The pause at
Do you really want to play a game? [Y/N]
then it proceeded to the next line right as I was going to enter something:
OF COURSE YOU DO THATS WHY YOU ARE HERE...
made me laugh4 years ago
how do you use it. Im looking to make a game. just want some help learning how to use it
hyperupcallhey!
i think a little while ago i made a tutorial on pygame. im sure there are other ones on the net, but if you want to check out mine, it's here.
once you make the simple game from the tutorial, it might become easier to follow the official pygame docs
hopefully i helped :)4 years ago
kaldisberzinsI forked your repl and added a score counter. All I did was add 3 lines at the end of your render function. You can see the repl here: https://repl.it/@kaldisberzins/Snek4 years ago