public void loop() throws ClassNotFoundException, IOException {
		// Online games must initialize with 2 players and no AI
		if (myOnline) {
			init(2, 0, false);
		} else {
			// This might be changed in later updates based on a file from the options menu
			double[] values = readSerializedDouble("options");
			init((int) values[1], (int) values[2], false);
		}

		FPS = 1;

		double oldTime = System.currentTimeMillis();
		double beginTime = System.currentTimeMillis();
		double changeTime = 1;

		//hi zack this is Nicholas I know what a comment does :) 

		while (true) {
			
			changeTime = System.currentTimeMillis() - oldTime;

			// Get the frames per second
			if (changeTime > 0) {
				FPS = 1 / changeTime * 1000;

				oldTime = System.currentTimeMillis();
			}

			// Draw the blue background
			myDraw.setPenColor(new Color(25, 25, 255));
			myDraw.filledSquare(0.0, 0.0, 100);
			myDraw.setPenColor(Color.GREEN);
			myDraw.square(0, 0, 2);
			//myDraw.picture(0, 0, "resources/Ocean.png", 30, 30);
			
			// Adjust the zoom of the screen
			adjustZoom(myBoats);

			// Update all the sprites
			updateSprites();
			
			// Handle the network
			handleNetwork();

			// FPS counter
			myDraw.setPenColor(Color.GREEN);
			myDraw.text(-zoom, zoom, "FPS: " + Integer.toString((int) FPS));

			if (myDraw.isKeyPressed(KeyEvent.VK_ENTER)) { // Enter key (restart game button)
				loop();
			}

			if (myDraw.isKeyPressed(KeyEvent.VK_O)) { // o key (pause button)
				onPause();
			}

			// Display all the changes to the screen
			myDraw.show(0);

			// Lock the FPS to be 62 frames per second
			while((System.currentTimeMillis() - beginTime) % 16 != 0) {

			}
		}		
	}