Skip to content

Commit

Permalink
blackjack
Browse files Browse the repository at this point in the history
  • Loading branch information
gigatexal committed May 12, 2016
1 parent ae6cfa3 commit 8830ce7
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 0 deletions.
Binary file added CS161/5.11.2016/a.out
Binary file not shown.
19 changes: 19 additions & 0 deletions CS161/5.11.2016/functions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
using namespace std;

int toInt(char input);
bool isVowel(char c);

int main(){
char a = 'a';
cout << toInt(a);


return 0;
}

int toInt(char input){
return static_cast<int>(input);
}


33 changes: 33 additions & 0 deletions CS161/lab8/lab7.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <iostream>
#include <fstream>
using namespace std;
/*
inFile.open(filePath.c_str(), ios::binary);
inFile.seekg(0, ios_base::end);
int fileLen = inFile.tellg();
inFile.seekg(0, ios_base::beg);
inFile.read(charArr, fileLen);
inFile.close();
*/

int fileSize(ifstream file);

int main() {

fstream file;
file.open("test.txt");
cout << fileSize(file);
file.close();

return 0;
}

int fileSize(ifstream file){
return 0;
}


9 changes: 9 additions & 0 deletions CS161/lab8/template.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>
using namespace std;

int main() {



return 0;
}
2 changes: 2 additions & 0 deletions CS161/lab8/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
this is a test
this is a test
7 changes: 7 additions & 0 deletions monkthecoder/cardshuffle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import random as rnd

picks = ['2 of hearts','3 of spades','ace of spades','king of hearts','7 of clubs']

print(rnd.randint(0,1) * len(picks))


Binary file not shown.
53 changes: 53 additions & 0 deletions teachingpython/blackjack/cards.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
cards = ['5 of hearts',
'8 of hearts',
'2 of hearts',
'9 of hearts',
'queen of hearts',
'ace of hearts',
'6 of hearts',
'king of hearts',
'7 of hearts',
'jack of hearts',
'4 of hearts',
'10 of hearts',
'3 of hearts',
'5 of spades',
'8 of spades',
'2 of spades',
'9 of spades',
'queen of spades',
'ace of spades',
'6 of spades',
'king of spades',
'7 of spades',
'jack of spades',
'4 of spades',
'10 of spades',
'3 of spades',
'5 of diamonds',
'8 of diamonds',
'2 of diamonds',
'9 of diamonds',
'queen of diamonds',
'ace of diamonds',
'6 of diamonds',
'king of diamonds',
'7 of diamonds',
'jack of diamonds',
'4 of diamonds',
'10 of diamonds',
'3 of diamonds',
'5 of clubs',
'8 of clubs',
'2 of clubs',
'9 of clubs',
'queen of clubs',
'ace of clubs',
'6 of clubs',
'king of clubs',
'7 of clubs',
'jack of clubs',
'4 of clubs',
'10 of clubs',
'3 of clubs']

3 changes: 3 additions & 0 deletions teachingpython/blackjack/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import importlib
import_module('cards')

0 comments on commit 8830ce7

Please sign in to comment.