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> | |
using namespace std; | |
struct hero | |
{ | |
string name; | |
string job; | |
int str; |
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> | |
using namespace std; | |
string mapName[3] = {"Volcano", "Forest", "Desert"}; | |
string mapDesc[3] = {"It is a beautiful volcano.\n There is a dark cloud hanging over it.\n It's pretty warm here.", "It's a forest.\n A bunch of critters wander around in it.", "It's a hot, hot desert.\n Not much else to it."}; | |
int main () | |
{ |
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 <fstream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
const char* INPUTFILE = "secretMessage.txt"; | |
// handles the encoding/decoding of a given char |
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 <random> | |
const int DIE_SIZE = 8; | |
const int NUM_ROLLS = 14000; | |
using namespace std; | |
int main () { | |
random_device rd; |
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 <random> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
enum suits {SPADES, DIAMONDS, CLUBS, HEARTS}; | |
enum modes {ACES_LOW, ACES_HIGH}; |
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 <random> | |
#include <vector> | |
const int GRID_SIZE = 6; | |
using namespace std; | |
struct node | |
{ |
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 <random> | |
#include <vector> | |
#include <cmath> | |
const int GRID_SIZE = 24; | |
const int NUM_ROOMS = 6; | |
const int MAX_ROOM_SIZE = GRID_SIZE / 5 + 2; | |
using namespace std; |
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 could use this (how my teacher chose to do it) | |
cout << " "; | |
if (myTurn) cout << "***"; else cout << " "; | |
cout << " "; | |
if (!myTurn( cout << "***"; else cout << " "; | |
cout << endl; | |
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 <iomanip> | |
const int devilScore = 19; | |
const int playerScore = 32; | |
const int streakTotal = 17; | |
const int dieRoll = 5; | |
using namespace std; | |
int main () |
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
def isPalindrome(n): | |
if (str(n) == str(n)[::-1]): | |
return True | |
return False |
OlderNewer