MCPcopy Create free account

hub / github.com/asweigart/PythonStdioGames / functions

Functions712 in github.com/asweigart/PythonStdioGames

↓ 2 callersFunctiongetRailCoordinates
Return a list of x, y coordinates of the zig zag order rail.
src/gamesbyexample/railfencecipher.py:65
↓ 2 callersFunctiongetRandomCard
Returns a random card that is NOT the Queen of Hearts.
src/gamesbyexample/threecardmonte.py:46
↓ 2 callersFunctiongetRandomLocation
()
src/gamesbyexample/pygame_games/wormy.py:164
↓ 2 callersFunctiongetRandomOffCameraPos
(camerax, cameray, objWidth, objHeight)
src/gamesbyexample/pygame_games/squirrel.py:344
↓ 2 callersFunctiongetRandomizedBoard
()
src/gamesbyexample/pygame_games/memorypuzzle.py:133
↓ 2 callersFunctiongetScoreOfBoard
Returns a dictionary with keys 'X' and 'O', whose values.
src/gamesbyexample/reversegam.py:170
↓ 2 callersFunctiongetStartingBoard
()
src/gamesbyexample/pygame_games/slidepuzzle.py:132
↓ 2 callersFunctiongetValidMoves
Return a list of valid moves that can be made on the board.
src/gamesbyexample/parkingvalet.py:125
↓ 2 callersFunctiongetValidMoves
Return a list of board space labels that have a player piece that can make a move.
src/gamesbyexample/hexapawn.py:227
↓ 2 callersFunctionisOnBoard
Returns True if (x, y) is a position on the board, otherwise returns False.
src/gamesbyexample/barca.py:193
↓ 2 callersFunctionisOutsideActiveArea
(camerax, cameray, obj)
src/gamesbyexample/pygame_games/squirrel.py:386
↓ 2 callersFunctionleftTopPixelCoordOfBox
(boxx, boxy)
src/gamesbyexample/pygame_games/inkspill.py:429
↓ 2 callersFunctionmakeMove
Carry out the given move on the given board.
src/gamesbyexample/slidingtilepuzzle.py:96
↓ 2 callersFunctionmakeMove
Change the board data structure with a sonar device character. Remove treasure chests from the chests list as they are found. Return False if
src/gamesbyexample/sonar.py:77
↓ 2 callersFunctionmakeNewGrass
(camerax, cameray)
src/gamesbyexample/pygame_games/squirrel.py:376
↓ 2 callersFunctionpieceCanAdvance
Return True if the player's piece at (x, y) on the board can move forward. Otherwise return False.
src/gamesbyexample/hexapawn.py:241
↓ 2 callersFunctionpieceCanCaptureLeft
Return True if the player's piece at (x, y) on the board can capture the piece forward and left. Otherwise return False.
src/gamesbyexample/hexapawn.py:254
↓ 2 callersFunctionpieceCanCaptureRight
Return True if the player's piece at (x, y) on the board can capture the piece forward and right. Otherwise return False.
src/gamesbyexample/hexapawn.py:269
↓ 2 callersFunctionresetAnimation
(board, allMoves)
src/gamesbyexample/pygame_games/slidepuzzle.py:314
↓ 2 callersFunctionrevealBoxesAnimation
(board, boxesToReveal)
src/gamesbyexample/pygame_games/memorypuzzle.py:223
↓ 2 callersMethodrotateLeft
(self)
inprogress/dropspin.py:108
↓ 2 callersMethodrotateRight
(self)
inprogress/dropspin.py:98
↓ 2 callersFunctionsleep
(seconds)
javascript_games/dna.js:11
↓ 2 callersFunctionsleep
(seconds)
javascript_games/digitalstream.js:8
↓ 2 callersFunctionsleep
(seconds)
javascript_games/deepcave.js:8
↓ 2 callersFunctionsleep
(seconds)
javascript_games/snailrace.js:10
↓ 2 callersFunctionsleep
(seconds)
javascript_games/ducklings.js:17
↓ 2 callersFunctionstartGameAnimation
(board)
src/gamesbyexample/pygame_games/memorypuzzle.py:254
↓ 2 callersFunctionterminate
()
src/gamesbyexample/pygame_games/simulate.py:137
↓ 2 callersFunctionterminate
()
src/gamesbyexample/pygame_games/slidepuzzle.py:118
↓ 2 callersFunctionterminate
()
src/gamesbyexample/pygame_games/squirrel.py:324
↓ 2 callersFunctionterminate
()
src/gamesbyexample/pygame_games/tetromino.py:308
↓ 2 callersFunctionterminate
()
src/gamesbyexample/pygame_games/pentomino.py:535
↓ 2 callersFunctionterminate
()
src/gamesbyexample/pygame_games/tetrominoforidiots.py:206
↓ 2 callersFunctiontranslateMessage
Encrypt or decrypt the message using the key.
src/gamesbyexample/vigenerecipher.py:73
↓ 2 callersFunctiontranslateMessage
Encrypt or decrypt the message using the key.
src/gamesbyexample/simplesubcipher.py:93
↓ 2 callersFunctionxyToA1
Convert (x, y) coordinates (like 0,0 or 1,4) to user-friendly coordinates (like A1 or B5).
src/gamesbyexample/barca.py:318
↓ 1 callersMethod_generateRandom
(self, steps=100)
inprogress/dropspin.py:118
↓ 1 callersFunctionaddRobots
Add NUM_ROBOTS number of robots to empty spaces on the board and return a list of these (x, y) spaces where robots are now located.
src/gamesbyexample/hungryrobots.py:111
↓ 1 callersFunctionaddToBoard
(board, piece)
src/gamesbyexample/pygame_games/tetromino.py:375
↓ 1 callersFunctionaddToBoard
(board, piece)
src/gamesbyexample/pygame_games/pentomino.py:602
↓ 1 callersFunctionaddToBoard
(board, piece)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:273
↓ 1 callersFunctionaddTwoToBoard
Adds a new 2 tile randomly to the board.
src/gamesbyexample/twentyfortyeight.py:224
↓ 1 callersFunctionamountOfDivisors
(number)
src/gamesbyexample/ulamspiral.py:46
↓ 1 callersFunctionanimateComputerMoving
(board, column)
src/gamesbyexample/pygame_games/fourinarow.py:234
↓ 1 callersFunctionanimateTileChange
(tilesToFlip, tileColor, additionalTile)
src/gamesbyexample/pygame_games/flippy.py:227
↓ 1 callersFunctionaskForBoardSize
Returns a (width, height) tuple of the board dimensions the player has requested.
src/gamesbyexample/hexapawn.py:63
↓ 1 callersFunctionaskForGuess
()
src/gamesbyexample/guess.py:9
↓ 1 callersFunctionaskForGuess
()
javascript_games/guess.js:10
↓ 1 callersFunctionaskForPlayerGuess
Let the player enter a password guess.
src/gamesbyexample/hacking.py:165
↓ 1 callersFunctionaskForPlayerMove
Asks the player for a move. Returns (fromTower, toTower).
src/gamesbyexample/towerofhanoi.py:46
↓ 1 callersFunctionaskForPlayerMove
Returns the (x, y) integer tuple of the place the player moves next, given their current location and the walls of the board.
src/gamesbyexample/hungryrobots.py:140
↓ 1 callersFunctionaskForPlayerMove
Asks the player which space on which small board to move on. The focusX and focusY values determine which small board the player can move on,
src/gamesbyexample/ultimatetictactoe.py:168
↓ 1 callersFunctionaskForPlayerMove
Let the player enter which direction they want to move, or if they want to quit. Make sure the player can't move off the edge of the map.
src/gamesbyexample/lostkitty.py:167
↓ 1 callersFunctionaskForPlayerMove
Let the player select a tile to slide.
src/gamesbyexample/slidingtilepuzzle.py:76
↓ 1 callersFunctionaskForPlayerMove
Let a player select a column on the board to drop a tile into. Returns a tuple of the (column, row) that the tile falls into.
src/gamesbyexample/fourinarow.py:90
↓ 1 callersFunctionaskForPlayerMove
Let the player type in their move. Returns the move as [x, y] (or returns the string 'QUIT')
src/gamesbyexample/reversegam.py:184
↓ 1 callersFunctionaskForPlayerMove
Asks the player which pit on their side of the board they select to sow seeds from. Returns the uppercase letter label of the selected pit as
src/gamesbyexample/mancala.py:111
↓ 1 callersFunctionaskForPlayerMove
Ask the player to select a move.
src/gamesbyexample/chancecheckers.py:187
↓ 1 callersFunctionaskForPlayerMove
Let the player enter their move.
src/gamesbyexample/pegsolitaire.py:121
↓ 1 callersFunctionaskForPlayerMove
Let the player enter the car and direction they want to move.
src/gamesbyexample/parkingvalet.py:207
↓ 1 callersFunctionaskForPlayerMove
Returns an (x, y) tuple of the player's move.
src/gamesbyexample/sonar.py:103
↓ 1 callersFunctionaskForPlayerMove
(maxLevelNum)
src/gamesbyexample/sokoban.py:210
↓ 1 callersFunctionaskForPlayerMove
Asks the player for the direction of their next move (or quit). Ensures they enter a valid move: either 'W', 'A', 'S' or 'D'.
src/gamesbyexample/twentyfortyeight.py:205
↓ 1 callersFunctionaskForPlayerMove
Asks the player for a move and returns a (x, y) tuple of integer indexes for the place they want to put their tile. Also returns (None, None)
src/gamesbyexample/gomoku.py:95
↓ 1 callersFunctionaskForPlayerMove
Ask the player to select a move. Returns a tuple with the board space label of the piece to move, followed by where to move it. If there are n
src/gamesbyexample/checkers.py:183
↓ 1 callersFunctionaskForPlayerMove
Let the player select a color to paint the upper left tile.
src/gamesbyexample/flooder.py:136
↓ 1 callersFunctioncanMakeMove
(board)
src/gamesbyexample/pygame_games/gemgem.py:273
↓ 1 callersFunctionchangeTile
Change the color/shape of a tile using the recursive flood fill algorithm.
src/gamesbyexample/flooder.py:184
↓ 1 callersFunctioncheckForKeyPress
()
src/gamesbyexample/pygame_games/tetromino.py:313
↓ 1 callersFunctioncheckForKeyPress
()
src/gamesbyexample/pygame_games/pentomino.py:540
↓ 1 callersFunctioncheckForKeyPress
()
src/gamesbyexample/pygame_games/tetrominoforidiots.py:211
↓ 1 callersFunctioncheckForQuit
()
src/gamesbyexample/pygame_games/inkspill.py:147
↓ 1 callersFunctioncheckForWinner
Looks at board and returns either '1' or '2' if there is a winner or 'tie' or 'no winner' if there isn't. The game ends when a player's pits a
src/gamesbyexample/mancala.py:180
↓ 1 callersFunctioncheckIfPlayerHasWon
Return True if there is only one peg left on the board.
src/gamesbyexample/pegsolitaire.py:184
↓ 1 callersFunctioncheckIfPlayerReachedEnd
Return True if the player has reached the opposite end of the board and won. Otherwise return False.
src/gamesbyexample/hexapawn.py:284
↓ 1 callersFunctioncheckKey
Return True if key is valid. Otherwise return False.
src/gamesbyexample/simplesubcipher.py:71
↓ 1 callersFunctionclearAquarium
Draw empty spaces over everything on the screen.
src/gamesbyexample/fishtank.py:266
↓ 1 callersFunctionclearScreen
Clear the terminal window screen by running cls or clear.
src/gamesbyexample/fireflies.py:192
↓ 1 callersFunctioncombineTilesInColumn
The column is a list of four tile. Index 0 is the "bottom" of the column, and tiles are pulled "down" and combine if they are the same. For ex
src/gamesbyexample/twentyfortyeight.py:121
↓ 1 callersFunctioncreateNewForest
Returns a dictionary for a new forest data structure.
src/gamesbyexample/forestfiresim.py:78
↓ 1 callersFunctiondecorateMap
Makes a copy of the given map object and modifies it. Here is what is done to it: * Walls that are corners are turned into corner pieces.
src/gamesbyexample/pygame_games/starpusher.py:275
↓ 1 callersFunctiondecryptMessage
(message, key)
src/gamesbyexample/railfencecipher.py:118
↓ 1 callersFunctiondecryptMessage
Decrypt the message using the key.
src/gamesbyexample/affinecipher.py:114
↓ 1 callersFunctiondecryptMessage
Decrypt the message using the key.
src/gamesbyexample/vigenerecipher.py:68
↓ 1 callersFunctiondecryptMessage
Decrypt the message using the key.
src/gamesbyexample/simplesubcipher.py:88
↓ 1 callersMethoddisplay
(self)
inprogress/dropspin.py:38
↓ 1 callersMethoddisplay
(self)
src/gamesbyexample/slitheringsnakes.py:160
↓ 1 callersMethoddisplay
(self)
src/gamesbyexample/zombiebitefight.py:120
↓ 1 callersFunctiondisplayAbacus
(number)
src/gamesbyexample/soroban.py:80
↓ 1 callersFunctiondisplayBoard
Displays the board and ants on the screen. The changedTiles argument is a list of (x, y) tuples for tiles on the screen that have changed and
src/gamesbyexample/langtonsant.py:122
↓ 1 callersFunctiondisplayBoard
Display the given board on the screen.
src/gamesbyexample/slidingtilepuzzle.py:40
↓ 1 callersFunctiondisplayBoard
Display the board on the screen.
src/gamesbyexample/barca.py:127
↓ 1 callersFunctiondisplayClue
Display a clue telling the player that the cat is very near, near, far, or very far away.
src/gamesbyexample/lostkitty.py:71
↓ 1 callersFunctiondisplayControls
()
src/gamesbyexample/soroban.py:142
↓ 1 callersFunctiondisplayFilledDiamond
(size)
src/gamesbyexample/diamonds.py:41
↓ 1 callersFunctiondisplayFilledDiamond
(size)
javascript_games/diamonds.js:49
↓ 1 callersFunctiondisplayFireflies
(lightPoints, darkPoints)
src/gamesbyexample/fireflies.py:178
↓ 1 callersFunctiondisplayForest
Display the forest data structure on the screen.
src/gamesbyexample/forestfiresim.py:90
↓ 1 callersFunctiondisplayOutlineDiamond
(size)
src/gamesbyexample/diamonds.py:25
← previousnext →201–300 of 712, ranked by callers