Commit d98bd520 authored by Irjan Olsen's avatar Irjan Olsen
Browse files

Add some comments

parent 66147041
......@@ -5,6 +5,8 @@
char block[4][4];
int total[4];
// Adds the letters's values to the running total
// and uses modulus on the total
void add_blk(char blk[4][4]) {
for (int i = 0; i < 4; ++i)
{
......@@ -16,6 +18,7 @@ void add_blk(char blk[4][4]) {
}
}
// Reorders the letters in the given block according to description.
void reorder_blk(char blk[4][4]) {
char tmp;
for (int i = 0; i < 3; ++i)
......@@ -45,6 +48,9 @@ void proc_blk(char blk[4][4]) {
}
int ind = 0;
// Goes through the given string and gets only a-z and A-Z
// from the string. Stores the last position it was at in
// 'ind' for finding the next block easier.
void get_next_block(char const *text) {
int len = 0;
while (len < 16) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment