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
// I think this works correctly... | |
int stringSize = strlen(s); | |
int i(0), j(0); | |
int runTotal(0); | |
for(;i<stringSize;i++) { | |
int temp = (int)s[i]; | |
for(j=0;j<(stringSize-(i+1));j++) { | |
temp *= 31; | |
} | |
runTotal += temp; |
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> | |
#include <string> | |
#include <fstream> | |
#include <iomanip> | |
using namespace std; | |
const int N = 16; | |
struct Names |
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
if (floorPads1.floorPadsPlaces[localPlayerPos[2]][localPlayerPos[0]] == 1) { | |
return 1; | |
} | |
else // Redundant but FUCK YOU | |
return 0; | |
//glEnable(GL_LIGHTING); //GO TO HELL | |
newRoomOrigin[i] = newRoomOrigin[i] + newRoomDim[i]; // Just look at it you dumbass |
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
/* This: */ | |
if (((System::Collections::IList ^)filterData->OpenSubKey("day_filter")->GetSubKeyNames())->Contains("days") == true) { | |
... | |
} | |
/* Or this: */ | |
using System::Collections; | |
... |
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
for (int i=0;i<nHands;i++) { | |
ArrayList<pCard.Card> player = new ArrayList<pCard.Card>(); | |
int playerScore = 0; | |
for (int j=0;j<cardsPerHand;j++) { | |
try { | |
player.add(deck.get(i+(j*nHands))); | |
} catch (IndexOutOfBoundsException e) { | |
System.out.println("Not enough cards for that player/hands combination."); | |
System.exit(1); | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<XnaContent> | |
<!-- TODO: replace this Asset with your own XML asset data. --> | |
<Asset Type="DataTypes.LevelData[]"> | |
<Item> | |
<WorldSize>15 15</WorldSize> | |
<TileSize>5 5</TileSize> | |
<WormNum>1</WormNum> | |
<LineNum>0</LineNum> | |
<MazeRooms>4</MazeRooms> |
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
for each (Generic::KeyValuePair<String ^, List<String ^> ^> ^item in temp->NameToDataMap) { | |
if (mergeInto->NameToDataMap->ContainsKey(item->Key)) { | |
for each (String ^subString in temp->NameToDataMap[item->Key]) { | |
mergeInto->NameToDataMap[item->Key]->Add(subString); | |
} | |
} else { | |
mergeInto->NameToDataMap->Add(item->Key, item->Value); | |
} | |
} |
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
public static void modConcrete(ref Texture2D modify, GraphicsDevice gDevice, Random tRandom) | |
{ | |
if (modify == null) | |
throw new Exception("Null texture."); | |
//float colorFloat = (float)(tRandom.Next(25, 75)) / 255.0f; | |
//Color bgColor = new Color(colorFloat, colorFloat, colorFloat, 1.0f); | |
Color setColor; | |
simplexCarmody simC = new simplexCarmody(tRandom); | |
double noise = 0f; |
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
public static void modConcrete(ref Texture2D modify, GraphicsDevice gDevice, Random tRandom) | |
{ | |
if (modify == null) | |
throw new Exception("Null texture."); | |
//float colorFloat = (float)(tRandom.Next(25, 75)) / 255.0f; | |
//Color bgColor = new Color(colorFloat, colorFloat, colorFloat, 1.0f); | |
Color setColor; | |
simplexCarmody simC = new simplexCarmody(tRandom); | |
double noise = 0; |
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
public class simplexCarmody | |
{ | |
int[] T; | |
private static int i, j, k; | |
private static int[] A = new int[3]{0, 0, 0}; | |
private static float u, v, w, s; | |
private static float onethird = 0.333333333f; | |
private static float onesixth = 0.166666667f; | |
public simplexCarmody(Random randObj) |
OlderNewer