MCPcopy Create free account

hub / github.com/asweigart/PythonStdioGames / functions

Functions712 in github.com/asweigart/PythonStdioGames

↓ 3 callersFunctionisValidMove
Returns False if the player's move on xstart, ystart is invalid. If it is a valid move, returns a list of spaces that would become the player'
src/gamesbyexample/reversegam.py:87
↓ 3 callersFunctionisValidMove
(board, tile, xstart, ystart)
src/gamesbyexample/pygame_games/flippy.py:335
↓ 3 callersFunctionline
Returns a list of points in a line between the given points. Uses the Bresenham line algorithm. More info at: https://en.wikipedia.org/wiki/B
src/gamesbyexample/vacuumbot.py:187
↓ 3 callersFunctionline
Returns a list of points in a line between (x1, y1) and (x2, y2). Uses the Bresenham line algorithm. More info at: https://en.wikipedia.org/w
src/gamesbyexample/analogclock.py:121
↓ 3 callersFunctionmakeMove
Place a tile on the board, flipping any of the opponent's pieces. Returns False for invalid moves, True for valid.
src/gamesbyexample/reversegam.py:208
↓ 3 callersFunctionmakeMove
(board, player, column)
src/gamesbyexample/pygame_games/fourinarow.py:132
↓ 3 callersFunctionmakeMove
(board, move)
src/gamesbyexample/pygame_games/slidepuzzle.py:158
↓ 3 callersFunctionmakeMove
(board, tile, xstart, ystart, realMove=False)
src/gamesbyexample/pygame_games/flippy.py:460
↓ 3 callersFunctionmakeTextObjs
(text, font, color)
src/gamesbyexample/pygame_games/tetromino.py:303
↓ 3 callersFunctionmakeTextObjs
(text, font, color)
src/gamesbyexample/pygame_games/pentomino.py:530
↓ 3 callersFunctionmakeTextObjs
(text, font, color)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:201
↓ 3 callersFunctionmovePiece
Move the piece at moveFrom on the board to moveTo. These are (x, y) integer tuples.
src/gamesbyexample/barca.py:240
↓ 3 callersMethodresetGrid
Reset the state of the grid, tracked by self.grid, to the state in self.originalSetup.
src/gamesbyexample/sudoku.py:38
↓ 3 callersFunctionshowTextScreen
(text)
src/gamesbyexample/pygame_games/tetromino.py:325
↓ 3 callersFunctionshowTextScreen
(text)
src/gamesbyexample/pygame_games/pentomino.py:552
↓ 3 callersFunctionshowTextScreen
(text)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:223
↓ 3 callersFunctionsleep
(seconds)
javascript_games/magicfortuneball.js:10
↓ 3 callersFunctionslideAnimation
(board, direction, message, animationSpeed)
src/gamesbyexample/pygame_games/slidepuzzle.py:255
↓ 3 callersFunctionslowPrint
Slowly print out the characters in text one at a time.
src/gamesbyexample/alphabetizewordquiz.py:91
↓ 3 callersFunctionslowPrint
Slowly print out the characters in text one at a time.
src/gamesbyexample/alphabetizequiz.py:63
↓ 3 callersFunctiontranslateBoardToPixelCoord
(x, y)
src/gamesbyexample/pygame_games/flippy.py:223
↓ 2 callersFunctionA1ToXy
Convert user-friendly coordinates (like A1 or B5) to (x, y) coordinates (like 0,0 or 1,4).
src/gamesbyexample/barca.py:324
↓ 2 callersMethod__init__
(self, zombies)
src/gamesbyexample/zombiebitefight.py:91
↓ 2 callersFunctionadjustPoint
Adjusts the 3D XYZ point to a 2D XY point fit for displaying on the screen. This resizes this 2D point by a scale of SCALEX and SCALEY, then m
src/gamesbyexample/rotatingcube.py:137
↓ 2 callersFunctionanimateDroppingToken
(board, column, color)
src/gamesbyexample/pygame_games/fourinarow.py:217
↓ 2 callersFunctioncalculateLevelAndFallFreq
(score)
src/gamesbyexample/pygame_games/tetromino.py:357
↓ 2 callersFunctioncalculateLevelAndFallFreq
(score)
src/gamesbyexample/pygame_games/pentomino.py:584
↓ 2 callersFunctioncalculateLevelAndFallFreq
(score)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:255
↓ 2 callersFunctionchangeBackgroundAnimation
(animationSpeed=40)
src/gamesbyexample/pygame_games/simulate.py:192
↓ 2 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/slidepuzzle.py:123
↓ 2 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/tetromino.py:348
↓ 2 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/pentomino.py:575
↓ 2 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/tetrominoforidiots.py:246
↓ 2 callersFunctionconvertToPixelCoords
(boxx, boxy)
src/gamesbyexample/pygame_games/tetromino.py:438
↓ 2 callersFunctionconvertToPixelCoords
(boxx, boxy)
src/gamesbyexample/pygame_games/pentomino.py:665
↓ 2 callersFunctionconvertToPixelCoords
(boxx, boxy)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:336
↓ 2 callersFunctioncopyIfPossible
Copy text to the clipboard if pyperclip is installed.
src/gamesbyexample/railfencecipher.py:85
↓ 2 callersFunctioncoverBoxesAnimation
(board, boxesToCover)
src/gamesbyexample/pygame_games/memorypuzzle.py:229
↓ 2 callersMethoddisplay
Display the current state of the grid on the screen.
src/gamesbyexample/sudoku.py:84
↓ 2 callersFunctiondisplayBoard
Display the board, robots, and player on the screen.
src/gamesbyexample/hungryrobots.py:121
↓ 2 callersFunctiondisplayBoard
Display the board on the screen.
src/gamesbyexample/royalgameofur.py:191
↓ 2 callersFunctiondisplayBoard
Display the board on the screen.
src/gamesbyexample/pegsolitaire.py:49
↓ 2 callersFunctiondisplayBoard
Display the board on the screen.
src/gamesbyexample/parkingvalet.py:94
↓ 2 callersFunctiondisplayBoard
Displays the board on the screen.
src/gamesbyexample/sonar.py:30
↓ 2 callersFunctiondisplayBoard
Display the board on the screen.
src/gamesbyexample/hexapawn.py:123
↓ 2 callersFunctiondisplayCards
Display the cards in "cards", which is a list of (rank, suit) tuples.
src/gamesbyexample/threecardmonte.py:28
↓ 2 callersFunctiondisplayCards
(allCards)
barebones/blackjack-barebones.py:107
↓ 2 callersFunctiondisplayDisk
Display a disk of the given width. A width of 0 means no disk.
src/gamesbyexample/towerofhanoi.py:98
↓ 2 callersFunctiondisplayGhostLegs
Display all of the legs and any current paths on them.
src/gamesbyexample/ghostleglottery.py:116
↓ 2 callersFunctiondisplayLeglessRow
Display a row that contains just the poles and no legs.
src/gamesbyexample/ghostleglottery.py:196
↓ 2 callersFunctiondisplayLetterLabels
Display a row of letter labels, based on the BOARD_WIDTH.
src/gamesbyexample/gomoku.py:87
↓ 2 callersFunctiondisplayLevel
(levelNum, maxLevelNum, levelData)
src/gamesbyexample/sokoban.py:192
↓ 2 callersFunctiondisplayMap
Display the map, with visited intersections and the player's current position.
src/gamesbyexample/lostkitty.py:111
↓ 2 callersFunctiondisplayMaze
(maze)
src/gamesbyexample/mazerunner2d.py:19
↓ 2 callersFunctiondisplayMaze
(maze, travelerX=None, travelerY=None)
src/gamesbyexample/mazemakerrec.py:23
↓ 2 callersFunctiondisplayRails
Display the letters in the rails.
src/gamesbyexample/railfencecipher.py:57
↓ 2 callersFunctiondisplayTowers
Display the current state.
src/gamesbyexample/towerofhanoi.py:81
↓ 2 callersFunctiondrawBoard
Draws the board data structure on the screen.
src/gamesbyexample/twentyfortyeight.py:74
↓ 2 callersFunctiondrawBoard
(board)
src/gamesbyexample/pygame_games/gemgem.py:518
↓ 2 callersFunctiondrawBox
(boxx, boxy, color, pixelx=None, pixely=None)
src/gamesbyexample/pygame_games/tetromino.py:444
↓ 2 callersFunctiondrawBox
(boxx, boxy, color, pixelx=None, pixely=None)
src/gamesbyexample/pygame_games/pentomino.py:671
↓ 2 callersFunctiondrawBox
(boxx, boxy, color, pixelx=None, pixely=None)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:342
↓ 2 callersFunctiondrawBoxCovers
(board, boxes, coverage)
src/gamesbyexample/pygame_games/memorypuzzle.py:209
↓ 2 callersFunctiondrawGuillotine
Draw the current state of the guillotine, along with the missed and correctly-guessed letters of the secret word.
src/gamesbyexample/guillotine.py:117
↓ 2 callersFunctiondrawHangman
Draw the current state of the hangman, along with the missed and correctly-guessed letters of the secret word.
src/gamesbyexample/hangmanunfair.py:113
↓ 2 callersFunctiondrawHangman
Draw the current state of the hangman, along with the missed and correctly-guessed letters of the secret word.
src/gamesbyexample/hangman.py:120
↓ 2 callersFunctiondrawIcon
(shape, color, boxx, boxy)
src/gamesbyexample/pygame_games/memorypuzzle.py:182
↓ 2 callersFunctiondrawInfo
(board, playerTile, computerTile, turn)
src/gamesbyexample/pygame_games/flippy.py:304
↓ 2 callersFunctiondrawLevel
(levelNum, levelData)
inprogress/stickyhands.py:69
↓ 2 callersFunctiondrawLifeMeter
(currentLife)
src/gamesbyexample/pygame_games/inkspill.py:384
↓ 2 callersFunctiondrawLinesBetweenPoints
Prints a line of characters between the specified points.
src/gamesbyexample/bouncinglines.py:115
↓ 2 callersFunctiondrawPiece
(piece, pixelx=None, pixely=None)
src/gamesbyexample/pygame_games/tetromino.py:483
↓ 2 callersFunctiondrawPiece
(piece, pixelx=None, pixely=None)
src/gamesbyexample/pygame_games/pentomino.py:710
↓ 2 callersFunctiondrawPiece
(piece, pixelx=None, pixely=None)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:381
↓ 2 callersFunctiondrawPressKeyMsg
()
src/gamesbyexample/pygame_games/wormy.py:110
↓ 2 callersFunctiondrawScore
(score)
src/gamesbyexample/pygame_games/gemgem.py:542
↓ 2 callersMethoddropOnColumn
(self, column)
inprogress/dropspin.py:74
↓ 2 callersFunctionenter1Through9
Presents a "minimap" of a tic-tac-toe board's spaces, labeled with numbers 1 through 9. Returns the numeric space they chose. Valid moves is a
src/gamesbyexample/ultimatetictactoe.py:210
↓ 2 callersFunctionfillBoardAndAnimate
(board, points, score)
src/gamesbyexample/pygame_games/gemgem.py:486
↓ 2 callersFunctionfindMatchingGems
(board)
src/gamesbyexample/pygame_games/gemgem.py:394
↓ 2 callersFunctionflashBorderAnimation
(color, board, animationSpeed=30)
src/gamesbyexample/pygame_games/inkspill.py:269
↓ 2 callersFunctionflashButtonAnimation
(color, animationSpeed=50)
src/gamesbyexample/pygame_games/simulate.py:151
↓ 2 callersFunctiongenerateNewPuzzle
(numSlides)
src/gamesbyexample/pygame_games/slidepuzzle.py:296
↓ 2 callersFunctiongenerateRandomBoard
(width, height, difficulty=MEDIUM)
src/gamesbyexample/pygame_games/inkspill.py:300
↓ 2 callersFunctiongetBet
Ask the player how much they want to bet for this round.
src/gamesbyexample/blackjack.py:123
↓ 2 callersFunctiongetBirthdays
Returns a list of number random date objects for birthdays.
src/gamesbyexample/birthdayparadox.py:10
↓ 2 callersFunctiongetBirthdays
Returns a list of birthday dates.
barebones/birthdayparadox-barebones.py:6
↓ 2 callersFunctiongetBlankRails
Lay out the letters in message on key number of rails.
src/gamesbyexample/railfencecipher.py:49
↓ 2 callersFunctiongetBoard
Return a board data structure based on the puzzle string.
src/gamesbyexample/parkingvalet.py:69
↓ 2 callersFunctiongetBoardCopyMinusGems
(board, gems)
src/gamesbyexample/pygame_games/gemgem.py:527
↓ 2 callersFunctiongetBounceAmount
(currentBounce, bounceRate, bounceHeight)
src/gamesbyexample/pygame_games/squirrel.py:329
↓ 2 callersFunctiongetCanvasString
Returns a multiline string of the line drawn in canvasData.
src/gamesbyexample/etchingdrawer.py:51
↓ 2 callersFunctiongetDistance
Returns the distance between (x1, y1) and (x2, y2) by using the Pythagorean Theorem.
src/gamesbyexample/lostkitty.py:65
↓ 2 callersFunctiongetMatch
Returns the date object of a birthday that occurs more than once in the birthdays list.
src/gamesbyexample/birthdayparadox.py:25
↓ 2 callersFunctiongetMatch
Returns the birthday that occurs more than once in the list.
barebones/birthdayparadox-barebones.py:52
↓ 2 callersFunctiongetNeighboringSpaces
Return the two spaces in the direction from the space argument.
src/gamesbyexample/pegsolitaire.py:67
↓ 2 callersFunctiongetNewBoard
Return a list of lists that represents a new tile puzzle.
src/gamesbyexample/slidingtilepuzzle.py:34
↓ 2 callersFunctiongetNthLetter
Returns the "nth" letter, where nth is an integer. The 0th letter is 'A', the 1st letter is 'B', the 2nd letter is 'C', and so on.
src/gamesbyexample/hexapawn.py:111
↓ 2 callersFunctiongetOrdIndicator
Returns the "ordinal indicator" of number, e.g. 'st' for 1 and 'rd' for 23, because we write them as "1st" and "23rd".
src/gamesbyexample/lostkitty.py:85
↓ 2 callersFunctiongetPlayerBlobPoints
(levelData, playerx, playery)
inprogress/stickyhands.py:78
← previousnext →101–200 of 712, ranked by callers