This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Michael Estes | |
//Conway's Game of Life C++ | |
#include <iostream> | |
#include <fstream> | |
using namespace std; | |
void enterBoard(char firstBoard[][45], int& rows, int& columns); | |
void fileBoard(char firstBoard[][45], int &rows, int &columns); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Michael Estes | |
//Connect 4 Console C++ | |
#include <iostream> | |
using namespace std; | |
struct playerInfo | |
{ | |
char playerName[81]; | |
char playerID; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Michael Estes | |
//Connect 4 Command Line C# | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
public struct playerInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame, random, sys | |
pygame.init() | |
global screen, size, background, state, mainState, jumpState | |
mainState = 0 | |
jumpState = 1 | |
slideState = 2 | |
size = [800, 600] | |
black = 0, 0, 0 | |
white = 255, 255, 255 | |
screen = pygame.display.set_mode(size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool CheckCollisionShapeCircle(sf::Shape & shape, sf::CircleShape circle){ | |
sf::Vector2f shapePoint, shapePosition, circleCenter; | |
float radius; | |
sf::FloatRect shapeBounds = shape.getLocalBounds(); | |
int numPoints = shape.getPointCount(); | |
shapePosition = shape.getPosition(); | |
circleCenter = circle.getPosition(); | |
radius = circle.getRadius(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Start of Vectors.h file | |
#include <cmath> | |
#ifndef FLYNNVECTOR_H | |
#define FLYNNVECTOR_H | |
#define pi 3.14159 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "vector.h" | |
#include "circle.h" | |
using namespace std; | |
#ifndef RECTANGLE_H | |
#define RECTANGLE_H | |
class Rectangle2D{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "vector.h" | |
class Ray2D{ | |
public: | |
gVector2 origin, direction, pointOnRay; | |
float length; | |
rayType type; | |
Ray2D() : origin(0, 0), direction(0, 0), length(0){}; | |
Ray2D(gVector2 o, gVector2 d, float l = 0) : origin(o), direction(d), length(l){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node duplicateList(node* list) | |
{ | |
node *currentNode = list, *newNode = nullptr, *tempNode = nullptr; | |
while (currentNode) | |
{ | |
tempNode = new node; | |
tempNode->tag = currentNode->tag; | |
tempNode->next = currentNode->next; | |
tempNode->random = currentNode->random; | |
currentNode = currentNode->next->next; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
const int array_length = 2048; | |
struct Q{ | |
int first; | |
int last; | |
unsigned char data[array_length]; |
OlderNewer