Commits

Stephen Tanner committed a280de8

Added comments and GPL

  • Participants
  • Parent commits cec9f5c

Comments (0)

Files changed (2)

  *
  *  Created on: Apr 2, 2012
  *      Author: stanner
+ *      Copyright   : This file is part of archers_dilemma.
+
+                archers_dilemma is free software: you can redistribute it and/or modify
+                it under the terms of the GNU General Public License as published by
+                the Free Software Foundation, either version 3 of the License, or
+                (at your option) any later version.
+
+                archers_dilemma is distributed in the hope that it will be useful,
+                but WITHOUT ANY WARRANTY; without even the implied warranty of
+                MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+                GNU General Public License for more details.
+
+                You should have received a copy of the GNU General Public License
+                along with archers_dilemma.  If not, see <http://www.gnu.org/licenses/>.
+ Description : Attempts to find Lana inside ODIN HQ
  */
 
 #include "queue.h"
  *
  *  Created on: Apr 2, 2012
  *      Author: stanner
+ *      Copyright   : This file is part of archers_dilemma.
+
+                archers_dilemma is free software: you can redistribute it and/or modify
+                it under the terms of the GNU General Public License as published by
+                the Free Software Foundation, either version 3 of the License, or
+                (at your option) any later version.
+
+                archers_dilemma is distributed in the hope that it will be useful,
+                but WITHOUT ANY WARRANTY; without even the implied warranty of
+                MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+                GNU General Public License for more details.
+
+                You should have received a copy of the GNU General Public License
+                along with archers_dilemma.  If not, see <http://www.gnu.org/licenses/>.
+ Description : Attempts to find Lana inside ODIN HQ
  */
 
 #include "queue.h"
 
 
 void init(struct Queue *q) {
-	/* Done */
+	/* This method will clear the pointers to the front and rear of the queue */
 	q->front = NULL;
 	q->rear = NULL;
 }
 
 void enqueue(struct Queue *q, int data) {
-	/* Done */
+	/* This method will take a queue and an int, and add the int to the queue */
 	struct Node *newNode;
 	newNode = (struct Node *) malloc(sizeof(struct Node));
 	newNode->data = data;
 }
 
 int dequeue(struct Queue *q) {
-
+	/* This method is to pop off the head of the queue and update the head*/
 	if (isEmpty(q)) {
 		return 0;
 	}
 
 
 int peekFront(struct Queue *q) {
-	/* Done */
+	/* Look at the front of the queue without removing it */
 	return q->front->data;
 }
 int peekRear(struct Queue *q) {
-	/* Done */
+	/* Look at the back of the queue without removing it */
 	return q->rear->data;
 }
 
 
 int contains(struct Queue *q, int data) {
-	/* Done */
+	/* Check the queue to see if it contains the element data */
 	struct Node *nn;
 	nn = q->front;
 
 	return 0;
 }
 int isEmpty(struct Queue *q) {
-	/* Done */
+	/* Rreturns true if the Queue is empty */
 	if (q->front == NULL) {
 		return 1;
 	}
 	}
 }
 int size(struct Queue *q) {
-	/* Done */
+	/* Counts the number of elements in a queue */
 	struct Node *nn;
 	nn = q->front;
 	int count = 0;