## MAKE TEAMS: x = read_csv("Roster.csv") name = x$name n = length(name) # name1 = as.character(1:floor(n/3)) name1 = rep("0",24) for(i in 1:24) name1[i] = intToUtf8(96+i) teams = function(){ y = name[sample(n)] for(i in 1:length(name1)){ cat("\n", "team", name1[i], y[(3*i-2)], ". ", y[(3*i-1)], ". ",y[(3*i)],". ") } } teams() Project teams: team a WOLFSON, MADELINE SCHELL . MONOZON, NICK . PILLADO, MICHAEL ROBERT . team b WEI, STEPHANIE . GAKKANI, SHIVANI SAI . LEE, GARREN . team c SOTOUDEH, SARAH GRACE PORAN . KAPOOR, ADITHYA . RODRIGUEZ, RUBEN . team d HU, HELENA GUINEVERE . KIM, HARRY . AHMAD, SAJAA . team e WILSON, ROGER STUART, III . KRISHNAN, NISHAANTH . KAO, DANIEL CHANG . team f AHUJA, AVII . GANDHI, MANAV SAMIR . CHOO, NATALIE JOY . team g AGRAWAL, KRATIK . TENG, KAYLA YU-CHEN . MANICKAM, JOSHUA ZACHARY . team h HO, RAINIER . HSIEH, WILLIAM . GREENBERG-BELL, JAKE . team i MENG, ZOEY F . ALVI, SEHER . GENGANIA, CAMILLE DOMINGO . team j VASSAR, TAYLOR DARLEAN . WANG, ASHLEY . FUKUYAMA, KEN . team k LIN, MELODY . PATHARE, TANAY . SUN, YUNING . team l PENG, KEVIN J . HONG, DAVE NIKHIL . DE LEEDE, KASHI . team m NIE, RONGCHEN . SHAH, SATVA BHAVIN . BATEMAN, ELENA MARIE . team n PAN, WILLIAM . SAADAT, SHAYAN . WANG, ZIYUAN . team o THORNTON, CHRISTOPHER DOUGLAS . BAIK, MINJOON . GRIGORIAN, GREGORY SARK . team p OHANIAN, MATTHEW JULIUS . LONERGAN, TAIG CHRISTIAN . TARAFDAR, TAMEEM AHMAD . team q DECASTONGRENE, ERIN MARLIS . TUNG, JOYCE CHENSAN . GRIFFITH, JAMES ALAN . team r HO, KIEUDIEM THUY . ABDUL-RAHIM, ALEC SAMIR . GAMEZ, SOFIA . team s DANESH, YASHA . PHAN, BRIAN CONG LUAN . KOZAKAI, YUKA . team t JIANG, RUIXI . YEUNG, CHRISTY . DINGLE, JAMES . team u JANG, DIANE . YII, JOYCE JIA JUN . NGUYEN, JOHNNY VAN . team v O'BRIEN, OSCAR HENRY . AWADALLA, AHMED SALAH . DULLA, ANISH . team w PICKETT, WOLFE HAOWEN . RO, SEOHYUNG . BACH, ERIK DE . team x PU, KYLE ZHUN . MCDONOGH-WONG, GRACIELA JIIT-HENG . HE, STELLA ZHUANGFEI . ## EXAMPLES:, install.packages("holdem") library(holdem) tommy ursula vera william xena Iveybruin = function (numattable, cards, board, round, currentbet, mychips, pot, roundbets, blinds, chips, ind, dealer, tablesleft) { ## all in with any 9 pair or higher, or if lower card is 10 or higher, ## or if I have less than 3 times the big blind a = 0 if ((cards[1, 1] == cards[2, 1]) && (cards[1, 1] > 8.5)) a = mychips if (cards[2,1] > 9.5) a = mychips if(mychips < 3*blinds) a = mychips a } ## end of Iveybruin allinSAK = function (numattable, cards, board, round, currentbet, mychips, pot, roundbets, blinds, chips, ind, dealer, tablesleft) { #all in with any pair, lower card 10 or higher, or have an A #all in if chips less than 3 times the blind a=0 if (cards[1, 1] == cards[2, 1]) a = mychips if (cards[2, 1] > 9.5) a = mychips if (cards[1,1] == 14) a = mychips if(mychips < 3*blinds) a = mychips a } poker = function(numattable, cards, board, round, currentbet, mychips, pot, roundbets, blinds, chips, ind, dealer, tablesleft){ a = 0 # all in with pocket pair of Jacks, Queens, Kings, or Aces, or AK of any suits if((cards[1,1] == cards[2,1]) && (cards[1,1] >= 11)) a = mychips if((cards[1,1] == 14) && (cards[2,1] == 13)) a = mychips # all in with AQ, AJ, KQ if same suit and no one else is all in yet if(currentbet <= blinds){ if((cards[1,1] == 14) && (cards[2,1] >= 11) && (cards[1,2] == cards[2,2])) a = mychips if((cards[1,1] == 13) && (cards[2,1] == 12) && (cards[1,2] == cards[2,2])) a = mychips } # all in with any pocket pair if only 1-2 players left to play and nobody is all in yet big.blind = dealer + 2 if(big.blind > numattable) big.blind <- big.blind - numattable players.left = big.blind - ind if(players.left < 0) players.left = players.left + numattable ## the 4 lines above make it so players.left = how many players haven't acted yet. if(currentbet <= blinds){ if((players.left <= 2) && (cards[1,1] == cards[2,1])) a = mychips } a }