scroll down for more projects

Pacman

This program is a version of the game pacman made in python. the yellow square is the player sqaure. to change the direction of the player press the arrow keys in the direction you want to go. in the consol when you run the game it will tell you to press enter to play, if you just press enter in will give you a random map with the difficulty level 2 of (1-3). you can also put just a number to choose the map you want to play. if you want a random map but a different difficulty level you can put a dash than a number of the difficulty level you want to play. to choose a specific map and difficulty level you can input a number than a dash than the difficulty level you want to play.

How it works

this program works by using the numpy module to create a grid of numbers that represent parts of the board. the game moves the player based on direction and what number is in the spot ahead of the player. when the player makes contact with one of the portal blocks the player will move to a spot on the board that the other portal block points towards. if the diffficulty is set to the hardest level the ghosts will decide to move based on the shortest path to the player, and they will avoid other ghosts when they can. if the difficulty is set to the second hardest level the ghosts will take the shortest path to the player, and not avoid the other ghosts. if the difficulty is set to the easiest level the ghosts will randomly move around the board. the other modules ued are: tkinter, heapq, and random.

Pacman map maker

this program allows you to make maps for the pacman game above you can select modes by pressing one of the following keys:
"1"(place poratl 1)
"2"(place poratl 2)
"3"(place poratl 3),
"4"(place poratl 4)
"w"(place walls)
"g"(place a ghost)
"p"(place pacman)
"r"(rotate direction to place next peice)
"v"(print out the code needed to male a new board).

How it works

this program uses the modules: numpy an tkinter. when you place a block the program will swap the spot you pressed with a number the represents the mode and direction. if you make a map add it to the dictonary of maps in the main pacman program. name the key of the dictionary the number it is in the dictionary ex:(1,2,3...).

Snake

use the arrow keys to change the direction of the snake. there are 4 modes in this version of snake:
1. regular : the classic rules of Snake
2. multiple-apples-# : this mode has the same rules as regular snake but multiple apples are on the board, replace the hashtag with the number of appples you want on the board
3. walls : this mode has the same rules as regular snake but walls are placed behind the snakes tail when you eat an apple.
4. lasergun-COLOR : this mode has the same rules as regular snake but you can shoot a laser from the snakes head by pressing left shift. replace the word COLOR with one of the options shown at the start in all caps

How it works

the modules used are: numpy, tkinter, and random. the board is represented in the code by using many different numbers that represent differnt things that can be on the board. the gradient color themes are created by using a function the translates a number that represents how long a part of the snake has been on the board. and turns it into a hex code value for a color.

Connect 4

the goal of connect 4 is to get 4 pieces in a row horizontially, vertically, or diagonally. you will put a piece on the board by dropping dow in a specific collumn. in this version of the game you can also change the settings including: number in a row to win, number of rows on the board, and number of columns on the board. this game is played in the console of the code editor.

How it works

this program uses the modules: numpy and colorama. a grid is created using the numpy module and uses numbers to represent what pieces go where. once the player enters the collumn they want to drop the piece the program will drop a piece in that collumn. the program will then print out a board filled with empty text with a colored background representing the different pieces. the game will keep running until a player has the number in a row required.

TicTacToe

TicTacToe is a game that is played on a 3x3 grid with each player taking a turn placing an X or an O. to win you need to place three pieces in a row. to place a piece enter a number 1-9 the represents a spot on the board:
1 | 2 | 3
-----------
4 | 5 | 6
-----------
7 | 8 | 9
this version of the game is played in the console of the code editor

How it works

this program does not use any imported modules. the grid is represented a list that has a length of 9. the program then displays the board and asks for input from the user in the console.

Minesweeper

to complete the game you need to click all of the tiles that do not have bombs hidden. if you click a tile that does not have a bomb hidden on it the tile will tell you how many bombs are around that tile. if a tile is blank there will be no number on it. you can place a flag on any tiles you think might have bombs hidden on them to remind you to not click them. to switch the flag placing mode on and off press the "f" key. to solve the board automatically press the "s" key. if you choose to play hardcore mode, if you click a tile with a bomb your compute will shut down

How it works

this program uses the modules: numpy, random, and tkinter. at the start of the game the amount of bombs enetered by the user are randomly placed on the board. the numpy module is used to create a grid of numbers that represent what the game should display on the screen. if hardore mode is choosen the program will run a command to shut down your computer by importin the os module.

Minesweeper3d

to complete the game you need to click all of the tiles that do not have bombs hidden. if you click a tile that does not have a bomb hidden on it the tile will tell you how many bombs are around that tile, on the same level as the tile as well as below and above it. if a tile is blank there will be no number on it. you can place a flag on any tiles you think might have bombs hidden on them to remind you to not click them. press the up and down arrow keys to change levels. to switch the flag placing mode on and off press the "f" key. to solve the board automatically press the "s" key. if you choose to play hardcore mode, if you click a tile with a bomb your compute will shut down

How it works

this program uses the modules: numpy, random, and tkinter. at the start of the game the amount of bombs enetered by the user are randomly placed on the board. the numpy module is used to create a grid of numbers that represent what the game should display on the screen. if hardore mode is choosen the program will run a command to shut down your computer by importin the os module. pressing the arrow keys will change which grid is diplayed on the screen.

Chess

Chess is a two-player strategy game played on a checkered board. Each player starts with 16 pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns. The goal of the game is to checkmate the opponent's king, which means to put the king in a position where it is under attack and cannot escape capture. The player with the white pieces moves first, and then players alternate turns. The pawns can only move forward, but capture diagonally. The rooks move horizontally or vertically, the knights move in an L-shape, the bishops move diagonally, the queen can move in any direction along a straight line, and the king can move one square in any direction. The knight is the only piece that can "jump" over other pieces. When a pawn reaches the opposite end of the board, it will be promoted to a queen. click any piece on the board when it is your turn, and the board willl be highleted to show where you can move the pice you selected. if the space with the king in it is red, then your are in check and must move your king out of check.

How it works

this program uses the modules: numpy and tkinter. the tkinter module is use to craete the window that has the buttons you can press. when you press a button with one of the pices on it the program will look for all of the moves that the piece can make based of the rules for chess. the numpy module is used to create a class with the attribute of each of the spots on the board.

Easy CMD

this python library allows you to easily controll many different commands that are run in the windows command prompt, and allows you to easily use those commands in your own programs

How it works

the functions in this library use the os module and the os.system command to execute the commands inside of the functions.

2048

2048 is a game that you play by using the arrow keys to combine tiles of the same number after making new move a 2 or 4 tile will be created. You can also press the m key while in the window to run an algorithim that will complete the game for you.

How it works

this program uses the modules: numpy and tkinter. the tkinter module is use to craete the window that has tiles that show the state of the game based on the set size of the board.