MCPcopy Create free account

hub / github.com/asweigart/PythonStdioGames / functions

Functions712 in github.com/asweigart/PythonStdioGames

↓ 1 callersFunctiongetNewBoard
Returns a dictionary that represents a Four in a Row board. The keys are (columnIndex, rowIndex) tuples of two integers, and the values are o
src/gamesbyexample/fourinarow.py:54
↓ 1 callersFunctiongetNewBoard
Return a board data structure with the starting tiles.
src/gamesbyexample/reversegam.py:60
↓ 1 callersFunctiongetNewBoard
Return a dictionary representing a Mancala board in the starting state: 4 seeds in each pit and 0 in the stores.
src/gamesbyexample/mancala.py:73
↓ 1 callersFunctiongetNewBoard
Set up a board data structure with empty spaces.
src/gamesbyexample/chancecheckers.py:48
↓ 1 callersFunctiongetNewBoard
Return a dictionary that represent the board. The keys are (x, y) integer tuples for positions and the values are one of the animal piece cons
src/gamesbyexample/barca.py:106
↓ 1 callersFunctiongetNewBoard
Return a dictionary representing a board for a new game.
src/gamesbyexample/pegsolitaire.py:36
↓ 1 callersFunctiongetNewBoard
Returns a dictionary representing the board. The keys are (x, y) tuples and the values are '~' and '.' strings to represent waves.
src/gamesbyexample/sonar.py:17
↓ 1 callersFunctiongetNewBoard
Returns a new data structure that represents a board. It's a dictionary with keys of (x, y) tuples and values of the tile at that space. The
src/gamesbyexample/twentyfortyeight.py:39
↓ 1 callersFunctiongetNewBoard
Returns a new dictionary that represents the board. The keys are (x, y) tuples of integers starting at 0 and going up to, but not including, B
src/gamesbyexample/gomoku.py:59
↓ 1 callersFunctiongetNewBoard
Return a new dictionary that represents the board. The keys are (x, y) tuples and the values are X_PLAYER, O_PLAYER, or EMPTY_SPACE. There is
src/gamesbyexample/hexapawn.py:88
↓ 1 callersFunctiongetNewBoard
Set up a board data structure with empty spaces.
src/gamesbyexample/checkers.py:42
↓ 1 callersFunctiongetNewBoard
Return a dictionary of a new Flood It board.
src/gamesbyexample/flooder.py:88
↓ 1 callersFunctiongetNewBoard
()
src/gamesbyexample/pygame_games/fourinarow.py:169
↓ 1 callersFunctiongetNewBoard
()
src/gamesbyexample/pygame_games/flippy.py:326
↓ 1 callersFunctiongetNewFloor
Return a dictionary to represent the color of the "floor". The keys are (x, y) integer tuples and the values are color strings such as 'red' o
src/gamesbyexample/floorpainters.py:83
↓ 1 callersFunctiongetNewPuzzle
Get a new puzzle by making random slides from a solved state.
src/gamesbyexample/slidingtilepuzzle.py:127
↓ 1 callersMethodgetNextBodyPart
Calls the appropriate display method for the next body part that needs to be displayed. Sets partToDisplayNext to None when finished.
src/gamesbyexample/ducklings.py:189
↓ 1 callersMethodgetNextBodyPart
()
javascript_games/ducklings.js:223
↓ 1 callersFunctiongetNumberForNthLetter
Returns the integer form of a letter. The integer of 'A' is 0, the integer of 'B' is 1, the integer of 'C' is 2, and so on.
src/gamesbyexample/hexapawn.py:117
↓ 1 callersFunctiongetPieceMovements
Return a list of (x, y) tuples representing spaces that hold pieces that the player can move according to Barca rules.
src/gamesbyexample/barca.py:247
↓ 1 callersFunctiongetPlayerGuess
Returns the letter the player entered. This function makes sure the player entered a single letter they haven't guessed before.
src/gamesbyexample/hangmanunfair.py:140
↓ 1 callersFunctiongetPlayerGuess
Returns the letter the player entered. This function makes sure the player entered a single letter they haven't guessed before.
src/gamesbyexample/guillotine.py:144
↓ 1 callersFunctiongetPlayerGuess
Returns the letter the player entered. This function makes sure the player entered a single letter they haven't guessed before.
src/gamesbyexample/hangman.py:147
↓ 1 callersFunctiongetPlayerNames
Ask how many players there are.
src/gamesbyexample/ghostleglottery.py:55
↓ 1 callersFunctiongetPotentialMoves
(board, tile, lookAhead)
src/gamesbyexample/pygame_games/fourinarow.py:273
↓ 1 callersFunctiongetProgressBar
Returns a string that represents a progress bar that has barWidth bars and has progressed progress amount out of a total amount.
src/gamesbyexample/progressbar.py:32
↓ 1 callersFunctiongetRandomChests
Return a list of (x, y) integer tuples that represent treasure chest locations.
src/gamesbyexample/sonar.py:61
↓ 1 callersFunctiongetRandomMove
(board, lastMove=None)
src/gamesbyexample/pygame_games/slidepuzzle.py:180
↓ 1 callersFunctiongetRandomNeighbor
(x, y)
src/gamesbyexample/slitheringsnakes.py:167
↓ 1 callersFunctiongetRandomPuzzle
Return a string representing a randomly selected puzzle. Here are three example puzzles from parkingvaletpuzzles.txt: BB.K..GI.KCCGIAAL.HDD.LM
src/gamesbyexample/parkingvalet.py:45
↓ 1 callersFunctiongetScore
Returns the sum of all the tiles on the board data structure.
src/gamesbyexample/twentyfortyeight.py:109
↓ 1 callersFunctiongetSecretNum
Returns a string made up of NUM_DIGITS unique random digits.
src/gamesbyexample/bagels.py:59
↓ 1 callersFunctiongetSpaceClicked
(mousex, mousey)
src/gamesbyexample/pygame_games/flippy.py:291
↓ 1 callersFunctiongetSpotClicked
(board, x, y)
src/gamesbyexample/pygame_games/slidepuzzle.py:204
↓ 1 callersFunctiongetSwappingGems
(board, firstXY, secondXY)
src/gamesbyexample/pygame_games/gemgem.py:235
↓ 1 callersFunctiongetValidMoves
(board, player, flipTally)
src/gamesbyexample/royalgameofur.py:215
↓ 1 callersFunctiongetWords
Return a list of 12 words that could possibly be the password. The secret password will be the first word in the list. To make the game fair,
src/gamesbyexample/hacking.py:52
↓ 1 callersFunctionhasLost
Return True if player has no checkers, otherwise False.
src/gamesbyexample/chancecheckers.py:274
↓ 1 callersFunctionhasLost
Return True if player has no checkers, otherwise False.
src/gamesbyexample/checkers.py:284
↓ 1 callersFunctionhasWon
Return True if the 'A' car has reached the right edge.
src/gamesbyexample/parkingvalet.py:197
↓ 1 callersFunctionhasWon
Return True if the entire board is one color/shape.
src/gamesbyexample/flooder.py:208
↓ 1 callersFunctionhasWon
(board)
src/gamesbyexample/pygame_games/inkspill.py:159
↓ 1 callersFunctionhasWon
(revealedBoxes)
src/gamesbyexample/pygame_games/memorypuzzle.py:284
↓ 1 callersFunctionhighlightSpace
(x, y)
src/gamesbyexample/pygame_games/gemgem.py:428
↓ 1 callersFunctionisBlocked
Returns True if the (x, y) position on the map is blocked by a wall or star, otherwise return False.
src/gamesbyexample/pygame_games/starpusher.py:315
↓ 1 callersFunctionisBoardFull
Return True if every space on the board has been taken.
src/gamesbyexample/tictactoe.py:85
↓ 1 callersFunctionisBoardFull
Returns True if the board is full of tiles, otherwise, returns False if there is an empty space somewhere on the board.
src/gamesbyexample/gomoku.py:184
↓ 1 callersMethodisBoardFull
Return True if every space on the board has been taken.
src/gamesbyexample/tictactoeoop.py:87
↓ 1 callersFunctionisCompleteLine
(board, y)
src/gamesbyexample/pygame_games/tetromino.py:408
↓ 1 callersFunctionisCompleteLine
(board, y)
src/gamesbyexample/pygame_games/pentomino.py:635
↓ 1 callersFunctionisCompleteLine
(board, y)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:306
↓ 1 callersFunctionisFull
Returns True if the `board` has no empty spaces, otherwise returns False.
src/gamesbyexample/fourinarow.py:119
↓ 1 callersFunctionisFull
Returns True if the board data structure has no blanks.
src/gamesbyexample/twentyfortyeight.py:233
↓ 1 callersFunctionisLevelFinished
Returns True if all the goals have stars in them.
src/gamesbyexample/pygame_games/starpusher.py:584
↓ 1 callersFunctionisMatchingParens
(strToCheck)
src/gamesbyexample/matchingparens.py:37
↓ 1 callersFunctionisOnBoard
Returns True if (x, y) is on the board, otherwise False.
src/gamesbyexample/sonar.py:73
↓ 1 callersFunctionisOnBoard
(x, y)
src/gamesbyexample/pygame_games/tetromino.py:391
↓ 1 callersFunctionisOnBoard
(x, y)
src/gamesbyexample/pygame_games/pentomino.py:618
↓ 1 callersFunctionisOnBoard
(x, y)
src/gamesbyexample/pygame_games/tetrominoforidiots.py:289
↓ 1 callersFunctionisOnCorner
Returns True if the position is in one of the four corners.
src/gamesbyexample/reversegam.py:248
↓ 1 callersFunctionisOnCorner
(x, y)
src/gamesbyexample/pygame_games/flippy.py:478
↓ 1 callersFunctionisPrime
Returns True if number is prime, otherwise returns False.
src/gamesbyexample/primenumbers.py:35
↓ 1 callersMethodisSolved
Returns True if the current grid is in a solved state.
src/gamesbyexample/sudoku.py:107
↓ 1 callersFunctionisValidSpace
Returns True if the space on the board is a valid space number and the space is blank.
src/gamesbyexample/tictactoe.py:65
↓ 1 callersMethodisValidSpace
Returns True if the space on the board is a valid space number and the space is blank.
src/gamesbyexample/tictactoeoop.py:68
↓ 1 callersFunctionisValidTowerConfiguration
(towers)
tests/test_towerofhanoi.py:133
↓ 1 callersFunctionisWinner
Returns True if `playerTile` has four tiles in a row on `board`, otherwise returns False.
src/gamesbyexample/fourinarow.py:129
↓ 1 callersFunctionisWinner
Return True if the player occupies three of the four watering holes on this board.
src/gamesbyexample/barca.py:333
↓ 1 callersFunctionisWinner
Return True if player is a winner on this TTTBoard.
src/gamesbyexample/tictactoe.py:71
↓ 1 callersFunctionisWinner
Returns True if player has four tiles in a row on board, otherwise returns False.
src/gamesbyexample/gomoku.py:135
↓ 1 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/bouncinglines.py:131
↓ 1 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/rotatingcube.py:37
↓ 1 callersFunctionloadLevels
(levelFilename)
src/gamesbyexample/sokoban.py:156
↓ 1 callersFunctionmain
()
inprogress/tsuromapmaker.py:121
↓ 1 callersFunctionmain
()
src/gamesbyexample/towerofhanoi.py:15
↓ 1 callersFunctionmain
()
src/gamesbyexample/slitheringsnakes.py:42
↓ 1 callersFunctionmain
()
src/gamesbyexample/ducklings.py:42
↓ 1 callersFunctionmain
()
src/gamesbyexample/hungryrobots.py:25
↓ 1 callersFunctionmain
()
src/gamesbyexample/diamonds.py:14
↓ 1 callersFunctionmain
()
src/gamesbyexample/hangmanunfair.py:68
↓ 1 callersFunctionmain
()
src/gamesbyexample/blackjack.py:19
↓ 1 callersFunctionmain
()
src/gamesbyexample/morsecode.py:27
↓ 1 callersFunctionmain
()
src/gamesbyexample/ultimatetictactoe.py:23
↓ 1 callersFunctionmain
()
src/gamesbyexample/alphabetizewordquiz.py:26
↓ 1 callersFunctionmain
()
src/gamesbyexample/alphabetizequiz.py:18
↓ 1 callersFunctionmain
()
src/gamesbyexample/lostkitty.py:25
↓ 1 callersFunctionmain
()
src/gamesbyexample/tictactoeoop.py:12
↓ 1 callersFunctionmain
()
src/gamesbyexample/bouncingdvd.py:43
↓ 1 callersFunctionmain
()
src/gamesbyexample/sierpinskisgame.py:14
↓ 1 callersFunctionmain
()
src/gamesbyexample/kochsnowflake.py:9
↓ 1 callersFunctionmain
()
src/gamesbyexample/langtonsant.py:46
↓ 1 callersFunctionmain
()
src/gamesbyexample/countingquiz.py:13
↓ 1 callersFunctionmain
()
src/gamesbyexample/vacuumbot.py:49
↓ 1 callersFunctionmain
()
src/gamesbyexample/bagels.py:14
↓ 1 callersFunctionmain
()
src/gamesbyexample/railfencecipher.py:13
↓ 1 callersFunctionmain
()
src/gamesbyexample/affinecipher.py:20
↓ 1 callersFunctionmain
()
src/gamesbyexample/royalgameofur.py:51
↓ 1 callersFunctionmain
()
src/gamesbyexample/bouncingdots.py:45
↓ 1 callersFunctionmain
()
src/gamesbyexample/slidingtilepuzzle.py:11
↓ 1 callersFunctionmain
()
src/gamesbyexample/fireflies.py:40
← previousnext →401–500 of 712, ranked by callers