Programming

Battleship Placement Algorithm

An algorithm created for a C++ programming class that places ships on a Battleship board according to certain specifications. The pieces could not be within 3 spaces of each other in any direction, and could be placed horizontally or vertically. User input is required to determine the dimensions of the board, which would have to be above 12 spaces in order for it to be large enough. The board is then generated and the results are printed onto the console.

The code for this project can be found on this GitHub page.

Blackjack Outcome Simulator

A program created for a C++ programming class that runs through 100 games of blackjack and prints the amount of times the dealer and player won. This assignment made use of the object-oriented paradigm so the code for the players, deck of cards, and game of blackjack itself are within their own classes. Each individual game is simulated by the dealer and the player drawing cards and acting according to the rules of Blackjack. Depending on the circumstances the AIs would decide to draw another card or wait for the other to bust.

The code for this project can be found on this GitHub page.