MCPcopy Create free account

hub / github.com/asweigart/PythonStdioGames / functions

Functions712 in github.com/asweigart/PythonStdioGames

↓ 25 callersMethodclear
(self)
inprogress/dropspin.py:29
↓ 17 callersFunctiongetGemAt
(board, x, y)
src/gamesbyexample/pygame_games/gemgem.py:357
↓ 12 callersMethodisBlocked
(self, direction)
src/gamesbyexample/slitheringsnakes.py:122
↓ 12 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
inprogress/rotatingcubebext.py:39
↓ 12 callersFunctiontransformPoint
(point1, point2, scalex=None, scaley=None, translatex=None, translatey=None)
inprogress/rotatingcubebext.py:118
↓ 11 callersFunctionisValidPosition
(board, piece, adjX=0, adjY=0)
src/gamesbyexample/pygame_games/tetromino.py:395
↓ 11 callersFunctionisValidPosition
(board, piece, adjX=0, adjY=0)
src/gamesbyexample/pygame_games/pentomino.py:622
↓ 11 callersFunctionisValidPosition
(board, piece, adjX=0, adjY=0)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:293
↓ 10 callersFunctionisWall
Returns True if the (x, y) position on the map is a wall, otherwise return False.
src/gamesbyexample/pygame_games/starpusher.py:265
↓ 9 callersFunctiongetHandValue
Returns the value of the cards. Face cards are worth 10, aces are worth 11 or 1 (this function picks the most suitable ace value).
src/gamesbyexample/blackjack.py:169
↓ 9 callersMethodgetZombieAt
(self, x, y)
src/gamesbyexample/zombiebitefight.py:113
↓ 9 callersFunctionisEmpty
Return True if the (x, y) is empty on the board and there's also no robot there.
src/gamesbyexample/hungryrobots.py:105
↓ 8 callersFunctiongetHandValue
(allCards)
barebones/blackjack-barebones.py:83
↓ 8 callersFunctionisValidMove
(board, move)
src/gamesbyexample/pygame_games/slidepuzzle.py:172
↓ 8 callersFunctionnextCol
Return the column letter that comes after column. Returns '' if column 'H'.
src/gamesbyexample/chancecheckers.py:115
↓ 8 callersFunctionnextCol
Return the column letter that comes after column. Returns '' if column 'H'.
src/gamesbyexample/checkers.py:111
↓ 8 callersFunctionotherCheckers
Return a string of the opponent's checkers.
src/gamesbyexample/chancecheckers.py:123
↓ 8 callersFunctionprevCol
Return the column letter that comes before column. Returns '' if column 'A'.
src/gamesbyexample/chancecheckers.py:107
↓ 8 callersFunctionprevCol
Return the column letter that comes before column. Returns '' if column 'A'.
src/gamesbyexample/checkers.py:103
↓ 8 callersFunctionsleep
(seconds)
javascript_games/ninetyninebottles.js:10
↓ 7 callersFunctiondrawBoard
(board, extraToken=None)
src/gamesbyexample/pygame_games/fourinarow.py:138
↓ 7 callersMethodisWinner
Return True if player is a winner on this TTTBoard.
src/gamesbyexample/tictactoeoop.py:73
↓ 7 callersMethodmakeMove
Place the number at the column (a letter from A to I) and row (an integer from 1 to 9) on the grid.
src/gamesbyexample/sudoku.py:54
↓ 7 callersFunctionotherCheckers
Return a string of the opponent's checkers.
src/gamesbyexample/checkers.py:119
↓ 7 callersFunctionwallStrToWallDict
Takes a string representation of a wall drawing (like those in ALL_OPEN or CLOSED) and returns a representation in a dictionary with (x, y) tu
src/gamesbyexample/mazerunner3d.py:20
↓ 6 callersFunction_executable_exists
(name)
src/gamesbyexample/__init__.py:49
↓ 6 callersFunctiongetValidMoves
(board, tile)
src/gamesbyexample/pygame_games/flippy.py:398
↓ 6 callersFunctiongetWinner
Return X_PLAYER, O_PLAYER, or TIED depending on who won. Return None if there is no winner and the board isn't full yet.
src/gamesbyexample/ultimatetictactoe.py:140
↓ 6 callersFunctionsleep
(seconds)
javascript_games/ninetyninebottles2.js:10
↓ 6 callersFunctionslowSpacePrint
Slowly display text with spaces in between each letter and lowercase letter i's.
src/gamesbyexample/magicfortuneball.py:9
↓ 5 callersFunctioncanMoveInDirection
Return True if the peg can make the given move.
src/gamesbyexample/pegsolitaire.py:87
↓ 5 callersFunctiondisplayBoard
Display the board data structure on the screen.
src/gamesbyexample/chancecheckers.py:74
↓ 5 callersFunctiondrawTile
(tilex, tiley, number, adjx=0, adjy=0)
src/gamesbyexample/pygame_games/slidepuzzle.py:215
↓ 5 callersFunctiongetRandomEmptySpace
Return a (x, y) integer tuple of an empty space on the board.
src/gamesbyexample/hungryrobots.py:95
↓ 5 callersFunctionisOnBoard
(x, y)
src/gamesbyexample/reversegam.py:138
↓ 5 callersFunctionisOnBoard
(x, y)
src/gamesbyexample/pygame_games/flippy.py:384
↓ 5 callersFunctionisValidMove
(board, column)
src/gamesbyexample/pygame_games/fourinarow.py:322
↓ 5 callersFunctionleftTopCoordsOfBox
(boxx, boxy)
src/gamesbyexample/pygame_games/memorypuzzle.py:165
↓ 5 callersMethodrememberBoard
(self)
inprogress/dropspin.py:127
↓ 5 callersFunctionreplaceAt
(str, index, replacement)
javascript_games/ninetyninebottles2.js:29
↓ 5 callersFunctionslowPrint
Slowly print out the characters in text one at a time.
src/gamesbyexample/ninetyninebottles2.py:16
↓ 5 callersFunctionslowPrint
(text, pauseAmount=0.1)
javascript_games/ninetyninebottles2.js:20
↓ 5 callersFunctionslowSpacePrint
(text, interval=0.1)
javascript_games/magicfortuneball.js:14
↓ 4 callersMethod_eraseLastBodySegment
(self)
src/gamesbyexample/slitheringsnakes.py:154
↓ 4 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/simulate.py:142
↓ 4 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/flippy.py:511
↓ 4 callersFunctiondisplayBoard
Display the board data structure on the screen.
src/gamesbyexample/checkers.py:68
↓ 4 callersFunctiondrawBoard
(board, transparency=255)
src/gamesbyexample/pygame_games/inkspill.py:355
↓ 4 callersFunctiondrawBoard
(board, revealed)
src/gamesbyexample/pygame_games/memorypuzzle.py:235
↓ 4 callersFunctiondrawBoard
(board)
src/gamesbyexample/pygame_games/flippy.py:257
↓ 4 callersFunctiondrawFromData
(image_data, image_width, image_height, left, top, pixel_size)
src/gamesbyexample/monalisa.py:32
↓ 4 callersFunctiongenerateRevealedBoxesData
(val)
src/gamesbyexample/pygame_games/memorypuzzle.py:126
↓ 4 callersFunctiongetAnimalStr
Returns the 4-character string of the animal for the piece at (x, y) on the board. This string will end with a ! if the piece is afraid of ano
src/gamesbyexample/barca.py:169
↓ 4 callersFunctiongetBlankPosition
(board)
src/gamesbyexample/pygame_games/slidepuzzle.py:150
↓ 4 callersMethodgetBoardStr
Return a text-representation of the board.
src/gamesbyexample/tictactoeoop.py:56
↓ 4 callersFunctiongetLeftTopOfTile
(tileX, tileY)
src/gamesbyexample/pygame_games/slidepuzzle.py:198
↓ 4 callersFunctiongetOneWordExcept
Returns a random word from WORDS that isn't in blocklist.
src/gamesbyexample/hacking.py:97
↓ 4 callersFunctiongetRandomVelocity
()
src/gamesbyexample/pygame_games/squirrel.py:336
↓ 4 callersFunctiongetShapeAndColor
(board, boxx, boxy)
src/gamesbyexample/pygame_games/memorypuzzle.py:203
↓ 4 callersFunctiongetValidMoves
Returns a list of [x, y] lists of valid moves for the given player on the given board.
src/gamesbyexample/reversegam.py:75
↓ 4 callersFunctionhilbertCurve
(level, angle)
src/gamesbyexample/hilbertcurve.py:35
↓ 4 callersFunctionisWinner
(board, tile)
src/gamesbyexample/pygame_games/fourinarow.py:339
↓ 4 callersFunctionmakeText
(text, color, bgcolor, top, left)
src/gamesbyexample/pygame_games/slidepuzzle.py:226
↓ 4 callersFunctionnumMatchingLetters
Returns the number of matching letters in these two words.
src/gamesbyexample/hacking.py:108
↓ 4 callersFunctionpasteWallDict
Copy the wall representation dictionary in srcWallDict on top of the one in dstWallDict, offset to the position given by left, top.
src/gamesbyexample/mazerunner3d.py:148
↓ 4 callersFunctionterminate
()
src/gamesbyexample/pygame_games/starpusher.py:593
↓ 4 callersFunctionterminate
()
src/gamesbyexample/pygame_games/wormy.py:159
↓ 3 callersMethod_isCompleteSetOfNumbers
Return True if numbers contains the digits 1 through 9.
src/gamesbyexample/sudoku.py:103
↓ 3 callersFunctionanimateMovingGems
(board, gems, pointsText, score)
src/gamesbyexample/pygame_games/gemgem.py:445
↓ 3 callersFunctioncheckForGemClick
(pos)
src/gamesbyexample/pygame_games/gemgem.py:509
↓ 3 callersFunctioncheckForKeyPress
()
src/gamesbyexample/pygame_games/wormy.py:117
↓ 3 callersFunctioncheckKey
Return True if key is a valid encryption key for this mode. Otherwise return False.
src/gamesbyexample/affinecipher.py:79
↓ 3 callersFunctiondisplayBoard
Displays the big tic-tac-toe board on the screen.
src/gamesbyexample/ultimatetictactoe.py:81
↓ 3 callersFunctiondisplayBoard
Display the board and its tiles on the screen.
src/gamesbyexample/fourinarow.py:66
↓ 3 callersFunctiondisplayBoard
Displays the board data structure passed to this function.
src/gamesbyexample/reversegam.py:152
↓ 3 callersFunctiondisplayBoard
Displays the game board as ASCII-art based on the board dictionary.
src/gamesbyexample/mancala.py:86
↓ 3 callersFunctiondisplayBoard
Display the board data structure on the screen.
src/gamesbyexample/gomoku.py:70
↓ 3 callersFunctiondisplayBoard
Display the board on the screen.
src/gamesbyexample/flooder.py:108
↓ 3 callersFunctiondisplayCards
Display all the cards in the cards list.
src/gamesbyexample/blackjack.py:195
↓ 3 callersFunctiondisplayHands
Show the player's and dealer's cards. Hide the dealer's first card if showDealerHand is False.
src/gamesbyexample/blackjack.py:152
↓ 3 callersFunctiondisplayHands
(playerHand, dealerHand)
barebones/blackjack-barebones.py:76
↓ 3 callersFunctiondisplayPlacings
Display who has come in what place.
src/gamesbyexample/ghostleglottery.py:107
↓ 3 callersFunctiondrawBoard
(board, message)
src/gamesbyexample/pygame_games/slidepuzzle.py:234
↓ 3 callersFunctiondrawButtons
()
src/gamesbyexample/pygame_games/simulate.py:185
↓ 3 callersFunctiondrawTriangle
(x, y, color)
src/gamesbyexample/sierpinskitriangle.py:30
↓ 3 callersFunctionfindBlankSpace
Return an (x, y) tuple of the blank space's location.
src/gamesbyexample/slidingtilepuzzle.py:68
↓ 3 callersFunctiongcd
Return the Greatest Common Divisor of a and b using Euclid's Algorithm.
src/gamesbyexample/affinecipher.py:141
↓ 3 callersFunctiongetBoardStr
Return a text-representation of the board.
src/gamesbyexample/tictactoe.py:54
↓ 3 callersFunctiongetKeyPartsFromKey
Get the two key A and key B parts from the key.
src/gamesbyexample/affinecipher.py:72
↓ 3 callersFunctiongetLowestEmptySpace
(board, column)
src/gamesbyexample/pygame_games/fourinarow.py:314
↓ 3 callersFunctiongetNewPiece
()
src/gamesbyexample/pygame_games/tetromino.py:364
↓ 3 callersFunctiongetNewPiece
()
src/gamesbyexample/pygame_games/pentomino.py:591
↓ 3 callersFunctiongetNewPiece
()
src/gamesbyexample/pygame_games/tetrominoforidiots.py:262
↓ 3 callersFunctiongetPossibleDstMoves
Get all possible destination moves from srcSpace. Returns a tuple of two lists. The first is a list of spaces the checker at srcSpace can mov
src/gamesbyexample/chancecheckers.py:129
↓ 3 callersFunctiongetPossibleDstMoves
Get all possible destination moves from srcSpace. Returns a tuple of two lists. The first is a list of spaces the checker at srcSpace can mov
src/gamesbyexample/checkers.py:125
↓ 3 callersFunctiongetRandomColor
Return a string of a random color.
src/gamesbyexample/fishtank.py:96
↓ 3 callersFunctiongetScore
Returns the number of captured pegs.
src/gamesbyexample/pegsolitaire.py:175
↓ 3 callersFunctiongetScoreOfBoard
(board)
src/gamesbyexample/pygame_games/flippy.py:409
↓ 3 callersFunctionhalfway
(x1, y1, x2, y2)
src/gamesbyexample/sierpinskisgame.py:39
↓ 3 callersFunctionisBoardFull
(board)
src/gamesbyexample/pygame_games/fourinarow.py:330
next →1–100 of 712, ranked by callers