public void undo() {
		// Only works for human players
		
		System.out.println("undo function");
		
		if(myOptions.getComputerPlayer()){
			System.out.println("undo hvc");
			// Human vs Computer game
			// UNDO Computer and Human moves here
			if (prevPrevMove[0][0] == -2){
				//last human move was a skip
				// UNDO Computer players[1] move here
				System.out.println("Computer Move");
				System.out.println(prevTake[0] + ", "+ prevTake[1]);
				if(prevTake[0] != -1){
					// 		undo take piece
					// take piece from side and add to board
					System.out.println("Adding Human Piece");
					System.out.println(myBoard.addPiece(0, prevTake));
					System.out.println("Added Human Piece");
				}
				myBoard.movePiece(prevMove[1], prevMove[0]);
				players[1].decrementNumMoves();
				players[currentPlayer].decrementNumMoves();
				// reset saved moves
				prevMove = new int[][] {{-1,-1},{-1,-1}};
				prevPrevMove = new int[][] {{-1,-1},{-1,-1}};
				prevTake = new int[] {-1,-1};
				prevPrevTake = new int[] {-1,-1};
			} else if(prevPrevMove[0][0] != -1){
				System.out.println("undo allowed");
				// Don't allow undo of placement
				// UNDO Computer players[1] move here
				System.out.println("Computer Move");
				System.out.println(prevTake[0] + ", "+ prevTake[1]);
				if(prevTake[0] != -1){
					// 		undo take piece
					// take piece from side and add to board
					System.out.println("Adding Human Piece");
					System.out.println(myBoard.addPiece(0, prevTake));
					System.out.println("Added Human Piece");
				}
				myBoard.movePiece(prevMove[1], prevMove[0]);
				players[1].decrementNumMoves();
				// UNDO Human players[0] move here
				System.out.println("Human Move");
				System.out.println(prevPrevTake[0] + ", "+ prevPrevTake[1]);
				if(prevPrevTake[0] != -1){
					// 		undo take piece
					// take piece from side and add to board
					System.out.println("Adding Computer Piece");
					System.out.println(myBoard.addPiece(1, prevPrevTake));
					System.out.println("Added Computer Piece");
				}
				myBoard.movePiece(prevPrevMove[1], prevPrevMove[0]);
				players[0].decrementNumMoves();
				// current player stays the same
				// reset saved moves
				prevMove = new int[][] {{-1,-1},{-1,-1}};
				prevPrevMove = new int[][] {{-1,-1},{-1,-1}};
				prevTake = new int[] {-1,-1};
				prevPrevTake = new int[] {-1,-1};
				System.out.println("undo complete");
			} else {
				System.out.println("undo NOT allowed");
			}
		}else{
			System.out.println("undo hvh");
			// Human vs Human
			System.out.println("undo piecesOS:" + myBoard.piecesOnSide((currentPlayer+1) % 2));
			if (prevMove[0][0] == -2){
				System.out.println("undoing a skip");
				// last human move was a skip
				// current player goes back to previous
				currentPlayer = (currentPlayer+1) % 2;
				players[currentPlayer].decrementNumMoves();
				// reset saved moves
				prevMove = new int[][] {{-1,-1},{-1,-1}};
				prevPrevMove = new int[][] {{-1,-1},{-1,-1}};
				prevTake = new int[] {-1,-1};
				prevPrevTake = new int[] {-1,-1};				
			} else if(prevMove[0][0] != -1){
				System.out.println("undo allowed");
				// current player goes back to previous
				currentPlayer = (currentPlayer+1) % 2;
				System.out.println(prevTake[0] + ", "+ prevTake[1]);
				if(prevTake[0] != -1){
					// 		undo take piece
					// take piece from side and add to board
					System.out.println("Adding Piece");
					System.out.println(myBoard.addPiece((currentPlayer+1) % 2, prevTake));
					System.out.println("Added Piece");
				}
				myBoard.movePiece(prevMove[1], prevMove[0]);
				
				players[currentPlayer].decrementNumMoves();

				prevMove = new int[][] {{-1,-1},{-1,-1}};
				prevPrevMove = new int[][] {{-1,-1},{-1,-1}};
				prevTake = new int[] {-1,-1};
				prevPrevTake = new int[] {-1,-1};
				System.out.println("undo complete");
			} else {
				System.out.println("undo NOT allowed");
			}
		}
		passBoard();
	}