* polybius.cpp
*
* Hadianto Leonard & Tian You Guo
* leonhadi & kevinguo
*
* EECS 183: Project 3
*
* <#description#>
*/
#include "polybius.h"
#include <string>
using namespace std;
void fillGrid(char grid[SIZE][SIZE], string content) {
int i=0;
m
for ( int row = 0; row < SIZE; row++) {
er as
for (int column = 0; column < SIZE; column ++, i++) {
co
grid[row][column] = content[i];
eH w
}
o.
} rs e
ou urc
}
string mixKey(string key) {
string str = "";
o
string s = key + ALNUM;
s = key + ALNUM;
aC s
bool flag = false;
vi y re
for (int i = 0; i < s.size(); i++) {
if (i == 0) {
str += s[i];
}
ed d
else if ( i != 0) {
for (int j = i-1; j >= 0; j--) {
ar stu
if (s[i] == s[j]) {
flag = true;
}
}
is
if (flag == false) {
str += s[i];
Th
}
else if ( flag == true) {
flag = false;
}
sh
}
}
return str;
}
string findInGrid(char c, char grid[SIZE][SIZE]) {
int i=0;
string s = "";
for ( int row = 0; row < SIZE; row++) {
https://www.coursehero.com/file/35206747/polybiuscpp/