@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g); // Clear the board

		for (int r = 0; r < this.board.length; r ++) { // Loop through all the rows
			for (int c = 0; c < this.board[r].length; c ++) { // Loop through all the columns in this row

				if (this.board[r][c] == " ") {g.drawRect(c * 20, r * 20, 20, 20);} // If the current cell is empty, draw an empty 20x20 square

				else {g.fillRect(c * 20, r * 20, 20, 20);} // Otherwise, draw a full 20x20 square

				if (r == this.row && c == this.column) { // If the current cell is the one the turtle is on:
					Polygon p = new Polygon(); // Create a new Polygon that will represent the turtle

					if (this.direction.equals("^")) { // If the turtle is facing up, create a isosceles triangle facing up
						p.addPoint(c * 20 + 10, r * 20); // The top corner of the triangle
						p.addPoint(c * 20, r * 20 + 20); // The bottom left corner of the triangle
						p.addPoint(c * 20 + 20, r * 20 + 20); // The bottom right corner of the triangle
					}

					if (this.direction.equals(">")) { // If the turtle is facing right, create a isosceles triangle facing right
						p.addPoint(c * 20, r * 20); // The top left point of the triangle
						p.addPoint(c * 20, r * 20 + 20); // The bottom left point of the triangle
						p.addPoint(c * 20 + 20, r * 20 + 10); // The right point of the triangle
					}

					if (this.direction.equals("<")) { // If the turtle is facing left, create a isosceles triangle facing left
						p.addPoint(c * 20, r * 20 + 10); // The top of the triangle
						p.addPoint(c * 20 + 20, r * 20); // The bottom left corner of the triangle
						p.addPoint(c * 20 + 20, r * 20 + 20); // The bottom right corner of the triangle
					}

					if (this.direction.equals("v")) { // If the turtle is facing down, create a isosceles triangle facing down
						p.addPoint(c * 20, r * 20); // The top left corner of the triangle
						p.addPoint(c * 20 + 20, r * 20); // The top right corner of the triangle
						p.addPoint(c * 20 + 10, r * 20 + 20); // The bottom corner of the triangle
					}

					g.setColor(Color.GREEN); // Set the colour to green so that the turtle stands out against the grid

					g.fillPolygon(p); // Add the turtle to the grid

					g.setColor(Color.BLACK); // Set the colour back to black
				}
			}
		}
	}