/** * @file jokenpo.cpp * @author Louise Stella <louiselbarbosa@gmail.com> * @version 1.0 * * This is the implementation file for the jokenpo functions used on the Jokenpo library. * * Created for the "Linguagem de Programação I" class from the * Universidade Federal do Rio Grande do Norte em 24/06/2017. * */ #include <iostream> #include <ctime> #include <cstdlib> #include "../include/jokenpo.hpp" using namespace std; namespace jokenpo{ int sum( int a, int b ){ return ( a + b ); } int cpuMove(void){ srand( time(0) ); int cpuChoice = rand() % 3; return cpuChoice; } int jokenpo(void){ string greeting = "Let's play ROCK-PAPER-SCISSORS!"; print(greeting); int option = 0; string choices = "Type '1' for 'Rock', '2' for 'Paper', or '3' if you want to choose'Scissors'."; print(choices); cin >> option; string playerMove = "Your play was: "; print(playerMove); print(option); string opponentMove = "And my play was: "; print(opponentMove); int SarumanMove = cpuMove(); print(SarumanMove); return 0; } }