@Override
	public Iterator<PegsMove> getMoves()
	{
		List<PegsMove> moves = new ArrayList<PegsMove>();
		for (PegsPoint p : type.places)
		{
			// If this is a peg...
			if (board[p.y][p.x] == PEG)
			{
				// Check all directions for a peg then a hole to jump into.
				for (int i = 0; i < type.shape; i++)
				{
					int mx = p.x + DIRS[i].x;
					int my = p.y + DIRS[i].y;
					int hx = p.x + DIRS[i].x * 2;
					int hy = p.y + DIRS[i].y * 2;
					
					if (is( PEG, mx, my ) && is( HOLE, hx, hy ))
					{
						moves.add( new PegsMove( p.x, p.y, hx, hy ) );
					}
				}
			}
		}
		return moves.iterator();
	}