Update MP2

This commit is contained in:
2024-03-07 10:16:43 -06:00
parent 92d6102039
commit ec700702c8
14 changed files with 266 additions and 23 deletions

View File

@@ -12,12 +12,22 @@
#include <iostream>
#include <ncurses.h>
#include <vector>
using namespace std;
#include "rockPaperScissors.h"
#include "main.h"
#include "2DArrayOperations.h"
int main(){
std::vector<std::vector<int>> vector = {
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12},
{13, 14, 15, 16}
};
int ch;
static int selection = 0;
static int * selectionPointer = &selection;
@@ -45,8 +55,23 @@ int main(){
gameLoop();
break;
case 1:
cout << "\033[2J\033[1;1H"; // Clear screen unicode sequence
printf("2D Vector:\n%s\n", printVector(vector).c_str());
printf("getTotal: %i\n", getTotal(vector));
printf("getAverage: %i\n", getAverage(vector));
printf("getRowTotal 0: %i\n", getRowTotal(vector, 0));
printf("getColumnTotal 0: %i\n", getColumnTotal(vector, 0));
printf("getHighestInRow 0: %i\n", getHighestInRow(vector, 0));
printf("getHighestInColumn 0: %i\n", getHighestInColumn(vector, 0));
printf("getLowestInRow 3: %i\n", getLowestInRow(vector, 3));
printf("getLowestInColumn 3: %i\n", getLowestInColumn(vector, 3));
cout << "Press Enter to Continue";
getchar();
break;
case 2:
cout << "\033[2J\033[1;1H"; // Clear screen unicode sequence
cout << "Press Enter to Continue";
getchar();
break;
}
break;